类retrofit.http.Headers源码实例Demo

下面列出了怎么用retrofit.http.Headers的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: githot   文件: ApiService.java
@Headers({
        "Content-Length: 0",
        "Accept: application/json"
})
@PUT("/user/starred/{user}/{repo}")
Observable<Object> starRepo(
        @Path("user") String user, @Path("repo") String repo,
        @Query(value = "access_token", encodeValue = true) String accessToken
);
 
源代码2 项目: patrol-android   文件: PatrulatrulAPI.java
@Multipart
@Headers({"Content-Type: multipart/form-data",
        "Accept: application/json",
        "Accept-Encoding: gzip, deflate"})
@POST("/api/{userID}/violation/create")
VideoAnswer uploadImage(@Part("photo") TypedFile photo,
                        @EncodedPath("userID") String userID,
                        @Part("latitude") double latitude,
                        @Part("longitude") double longitude);
 
@Headers({ACCEPT_JSON_HEADER})
@FormUrlEncoded
@POST("/oauth/access_token")
BitlyOAuthToken getToken(@Header("Authorization") String authorizationHeader,
                                 @Field("grant_type") String grantType,
                                 @Field("username") String username,
                                 @Field("password") String password);
 
源代码4 项目: githot   文件: OAuthGitHubWebFlow.java
@Headers({
        "Accept: application/json"
})
@FormUrlEncoded
@POST("/login/oauth/access_token")
Observable<AccessTokenResponse> getOAuthToken(@Field("client_id") String client_id,
                                              @Field("client_secret") String client_secret, @Field("code") String code);
 
源代码5 项目: dhis2-android-dashboard   文件: DhisApi.java
@Headers("Accept: application/text")
@GET("/analytics/events/{dataType}/{program}"
        + ".html+css?displayProperty=NAME")
Response getEventReportTableData(@Path("program") String program,
        @Query("stage") String programStage,
        @Query("dimension") List<String> dimensions,
        @Query("outputType") String outputType,
        @Query("aggregationType") String aggregationType,
        @Query("value") String value,
        @Path("dataType") String dataType,
        @Query("filter") List<String> filter);
 
源代码6 项目: kayenta   文件: NewRelicRemoteService.java
@Headers("Accept: application/json")
@GET("/v1/accounts/{application_key}/query")
NewRelicTimeSeries getTimeSeries(
    @Header("X-Query-Key") String apiKey,
    @Path("application_key") String applicationKey,
    @Query("nrql") String query);
 
源代码7 项目: dagger2-example   文件: GitHubService.java
@GET("/users/{user}/repos")
@Headers("User-Agent: DaggerDemo")
Observable<List<Repository>> listRepos(@Path("user") String user);
 
源代码8 项目: Muzesto   文件: LastFmRestService.java
@Headers("Cache-Control: public")
@GET(BASE_PARAMETERS_ALBUM)
void getAlbumInfo(@Query("artist") String artist, @Query("album") String album, Callback<AlbumInfo> callback);
 
源代码9 项目: Muzesto   文件: LastFmRestService.java
@Headers("Cache-Control: public")
@GET(BASE_PARAMETERS_ARTIST)
void getArtistInfo(@Query("artist") String artist, Callback<ArtistInfo> callback);
 
源代码10 项目: xDrip   文件: DexcomShare.java
@POST("Publisher/DoesContactExistByName")
@Headers({"Content-Length: 0"})
Call<ResponseBody> doesContactExist(@Query("sessionId") String sessionId,
                                    @Query("contactName") String contactName);
 
源代码11 项目: xDrip   文件: DexcomShare.java
@POST("Publisher/CreateContact")
@Headers({"Content-Length: 0"})
Call<String> createContact(@Query("sessionId") String sessionId,
                                 @Query("contactName") String contactName,
                                 @Query("emailAddress") String emailAddress);
 
源代码12 项目: xDrip   文件: DexcomShare.java
@POST("Publisher/DeleteContact")
@Headers({"Content-Length: 0"})
Call<ResponseBody> deleteContact(@Query("sessionId") String sessionId,
                                 @Query("contactId") String contactId);
 
源代码13 项目: xDrip   文件: DexcomShareInterface.java
@POST("General/LoginPublisherAccountByName")
@Headers({USER_AGENT, "Content-Type: application/json", "Accept: application/json"})
Call<String> getSessionId(@Body ShareAuthenticationBody body);
 
源代码14 项目: xDrip-plus   文件: DexcomShare.java
@POST("Publisher/DoesContactExistByName")
@Headers({"Content-Length: 0"})
Call<ResponseBody> doesContactExist(@Query("sessionId") String sessionId,
                                    @Query("contactName") String contactName);
 
源代码15 项目: xDrip-plus   文件: DexcomShare.java
@POST("Publisher/CreateContact")
@Headers({"Content-Length: 0"})
Call<String> createContact(@Query("sessionId") String sessionId,
                                 @Query("contactName") String contactName,
                                 @Query("emailAddress") String emailAddress);
 
源代码16 项目: xDrip-plus   文件: DexcomShare.java
@POST("Publisher/DeleteContact")
@Headers({"Content-Length: 0"})
Call<ResponseBody> deleteContact(@Query("sessionId") String sessionId,
                                 @Query("contactId") String contactId);
 
源代码17 项目: xDrip-plus   文件: DexcomShareInterface.java
@POST("General/LoginPublisherAccountByName")
@Headers({USER_AGENT, "Content-Type: application/json", "Accept: application/json"})
Call<String> getSessionId(@Body ShareAuthenticationBody body);
 
源代码18 项目: xDrip-plus   文件: DexcomShareInterface.java
@POST("Publisher/ReadPublisherLatestGlucoseValues")
@Headers({USER_AGENT, "Content-Length: 0", "Content-Type: application/json", "Accept: application/json"})
Call<List<ShareGlucoseRecord>> getGlucoseRecords(@QueryMap Map<String, String> options);
 
源代码19 项目: dhis2-android-dashboard   文件: DhisApi.java
@GET("/reports?paging=false")
@Headers("Accept: application/json")
Map<String, List<DashboardItemContent>> getReports(@QueryMap Map<String, String> queryMap);
 
源代码20 项目: materialup   文件: ApiService.java
@Headers("Accept: application/json")
@GET("/")
Observable<MuResponse> getHomeStream(@Query("page") int page, @Query("sort") String sort);
 
源代码21 项目: materialup   文件: ApiService.java
@Headers("Accept: application/json")
@GET("/posts/c/{cat}/{sub}")
Observable<MuResponse> getCategoryStream(@Path("cat") String cat, @Path("sub") String sub, @Query("page") int page, @Query("sort") String sort);
 
源代码22 项目: materialup   文件: ApiService.java
@Headers("Accept: application/json")
@GET("/collections/{id}")
Observable<MuResponse> getCollectionPosts(@Path("id") String id, @Query("page") int page);
 
源代码23 项目: materialup   文件: ApiService.java
@Headers("Accept: application/json")
@GET("/collections")
Observable<MuResponse> getFeaturedCollection(@Query("page") int page);
 
源代码24 项目: materialup   文件: ApiService.java
@Headers("Accept: application/json")
@GET("/collections/{sub}")
Observable<MuResponse> getCollections(@Path("sub") String sub, @Query("page") int page);
 
源代码25 项目: materialup   文件: ApiService.java
@Headers("Accept: application/json")
@GET("/users/{id}/{type}")
Observable<MuResponse> getUserPosts(@Path("id") String id, @Path("type") String type, @Query("page") int page);
 
源代码26 项目: Mover   文件: MoverService.java
@FormUrlEncoded @POST("/auth/ajax")
@Headers("X-Requested-With: XMLHttpRequest")
public Response signIn(@Field("username") String username, @Field("password") String password);
 
源代码27 项目: materialup   文件: ApiService.java
@Headers("Accept: application/json")
@GET("/users/{id}/collections")
Observable<MuResponse> getUserCollections(@Path("id") String id, @Query("page") int page);
 
源代码28 项目: dhis2-android-dashboard   文件: DhisApi.java
@Headers("Content-Type: text/plain")
@POST("/interpretations/chart/{uid}")
Response postChartInterpretation(@Path("uid") String elementUid,
                                 @Body TypedString interpretationText);
 
源代码29 项目: materialup   文件: ApiService.java
@Headers("Accept: application/json")
@GET("/users/{id}/posts")
Observable<MuResponse> getUserCreated(@Path("id") String id, @Query("page") int page);
 
源代码30 项目: materialup   文件: ApiService.java
@Headers("Accept: application/json")
@GET("/users/{id}/showcases")
Observable<MuResponse> getUserShowcased(@Path("id") String id, @Query("page") int page);