retrofit2.http.Headers Java Examples

The following examples show how to use retrofit2.http.Headers. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RestConversations.java    From botbuilder-java with MIT License 5 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8",
    "x-ms-logging-context: com.microsoft.bot.schema.Conversations uploadAttachment" })
@POST("v3/conversations/{conversationId}/attachments")
CompletableFuture<Response<ResponseBody>> uploadAttachment(
    @Path("conversationId") String conversationId,
    @Body AttachmentData attachmentUpload,
    @Header("accept-language") String acceptLanguage,
    @Header("User-Agent") String userAgent
);
 
Example #2
Source File: RestConversations.java    From botbuilder-java with MIT License 5 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8",
    "x-ms-logging-context: com.microsoft.bot.schema.Conversations getConversations" })
@GET("v3/conversations")
CompletableFuture<Response<ResponseBody>> getConversations(
    @Query("continuationToken") String continuationToken,
    @Header("accept-language") String acceptLanguage,
    @Header("User-Agent") String userAgent
);
 
Example #3
Source File: KcaDownloader.java    From kcanotify_h5-master with GNU General Public License v3.0 5 votes vote down vote up
@Headers({
        "Accept: application/json",
        "X-Identify: app/kcanotify",
        "Referer: app:/KCA/",
        "Cache-control: no-cache, no-store, must-revalidate",
        "Content-Type: application/x-www-form-urlencoded"
})
@GET("/subtitles/{local}")
Call<String> getSubTitle(@Path("local") String local);
 
Example #4
Source File: RestConversations.java    From botbuilder-java with MIT License 5 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8",
    "x-ms-logging-context: com.microsoft.bot.schema.Conversations createConversation" })
@POST("v3/conversations")
CompletableFuture<Response<ResponseBody>> createConversation(
    @Body ConversationParameters parameters,
    @Header("accept-language") String acceptLanguage,
    @Header("User-Agent") String userAgent
);
 
Example #5
Source File: RestConversations.java    From botbuilder-java with MIT License 5 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8",
    "x-ms-logging-context: com.microsoft.bot.schema.Conversations getConversationPagedMembers" })
@GET("v3/conversations/{conversationId}/pagedmembers?continuationToken={continuationToken}")
CompletableFuture<Response<ResponseBody>> getConversationPagedMembers(
    @Path("conversationId") String conversationId,
    @Path("continuationToken") String continuationToken,
    @Header("accept-language") String acceptLanguage,
    @Header("User-Agent") String userAgent
);
 
Example #6
Source File: RestUserToken.java    From botbuilder-java with MIT License 5 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8",
    "x-ms-logging-context: com.microsoft.bot.schema.UserTokens getToken" })
@GET("api/usertoken/GetToken")
CompletableFuture<Response<ResponseBody>> getToken(
    @Query("userId") String userId,
    @Query("connectionName") String connectionName,
    @Query("channelId") String channelId,
    @Query("code") String code
);
 
Example #7
Source File: PetOperationInvoke.java    From baidu-chain-dog with GNU General Public License v3.0 5 votes vote down vote up
@Headers({
        "Accept: application/json",
        "Accept-Encoding: gzip, deflate, br",
        "Accept-Language: zh-CN,zh;q=0.9,en;q=0.8",
        "Connection: keep-alive",
        "Host: pet-chain.baidu.com",
        "Origin: https://pet-chain.baidu.com",
        "Referer: https://pet-chain.baidu.com/chain/dogMarket"
})
@POST("data/market/queryPetsOnSale")
Call<SaleData> queryList(@Body PetOnSaleRequest body);
 
Example #8
Source File: KcaDownloader.java    From kcanotify_h5-master with GNU General Public License v3.0 5 votes vote down vote up
@Headers({
        "Accept: application/json",
        "X-Identify: app/kcanotify",
        "Referer: app:/KCA/",
        "Cache-control: no-cache, no-store, must-revalidate",
        "Content-Type: application/x-www-form-urlencoded"
})
@GET("/kcanotify/version.json")
Call<String> getH5RecentVersion();
 
Example #9
Source File: KcaDownloader.java    From kcanotify_h5-master with GNU General Public License v3.0 5 votes vote down vote up
@Headers({
        "Accept: application/octet-stream",
        "X-Identify: app/kcanotify",
        "Referer: app:/KCA/",
        "Content-Type: application/x-www-form-urlencoded"
})
@GET("/kcanotify/kca_api_start2.php?")
Call<String> getGameData(@Query("v") String v);
 
Example #10
Source File: RestConversations.java    From botbuilder-java with MIT License 5 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8",
    "x-ms-logging-context: com.microsoft.bot.schema.Conversations deleteActivity" })
@HTTP(path = "v3/conversations/{conversationId}/activities/{activityId}", method = "DELETE", hasBody = true)
CompletableFuture<Response<ResponseBody>> deleteActivity(
    @Path("conversationId") String conversationId,
    @Path("activityId") String activityId,
    @Header("accept-language") String acceptLanguage,
    @Header("User-Agent") String userAgent
);
 
Example #11
Source File: V9PornServiceApi.java    From v9porn with MIT License 5 votes vote down vote up
/**
 * 收藏视频
 * @return ob
 */
//@Headers({"Domain-Name: " + Api.PORN9_VIDEO_DOMAIN_NAME})
//@GET("/ajax/myajaxphp.php")
//Observable<String> favoriteVideo(@Query("cpaint_function") String cpaintFunction, @Query("cpaint_argument[]") String uId, @Query("cpaint_argument[]") String videoId, @Query("cpaint_argument[]") String ownerId, @Query("cpaint_response_type") String responseType, @Header("Referer") String referer);
@Headers({"Domain-Name: " + Api.PORN9_VIDEO_DOMAIN_NAME})
@GET("/add_favorite.php")
//@FormUrlEncoded
Observable<String> favoriteVideo(@Query("VID")String VID,@Query("UID") String UID,@Query("VUID") String VUID,@Header("Referer") String referer);
 
Example #12
Source File: SampleApiService.java    From Gander with Apache License 2.0 5 votes vote down vote up
@PUT("/put")
@Headers({
        "Cache-Control: max-age=640000",
        "Library: Gander",
        "Client: Sample",
        "X-Foo: Bar",
        "X-Ping: Pong"
})
Call<Void> put(@Body Data body);
 
Example #13
Source File: RestConversations.java    From botbuilder-java with MIT License 5 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8",
    "x-ms-logging-context: com.microsoft.bot.schema.Conversations getConversationPagedMembers" })
@GET("v3/conversations/{conversationId}/pagedmembers")
CompletableFuture<Response<ResponseBody>> getConversationPagedMembers(
    @Path("conversationId") String conversationId,
    @Header("accept-language") String acceptLanguage,
    @Header("User-Agent") String userAgent
);
 
Example #14
Source File: RestConversations.java    From botbuilder-java with MIT License 5 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8",
    "x-ms-logging-context: com.microsoft.bot.schema.Conversations updateActivity" })
@PUT("v3/conversations/{conversationId}/activities/{activityId}")
CompletableFuture<Response<ResponseBody>> updateActivity(
    @Path("conversationId") String conversationId,
    @Path("activityId") String activityId,
    @Body Activity activity,
    @Header("accept-language") String acceptLanguage,
    @Header("User-Agent") String userAgent
);
 
Example #15
Source File: RestConversations.java    From botbuilder-java with MIT License 5 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8",
    "x-ms-logging-context: com.microsoft.bot.schema.Conversations sendConversationHistory" })
@POST("v3/conversations/{conversationId}/activities/history")
CompletableFuture<Response<ResponseBody>> sendConversationHistory(
    @Path("conversationId") String conversationId,
    @Body Transcript history,
    @Header("accept-language") String acceptLanguage,
    @Header("User-Agent") String userAgent
);
 
Example #16
Source File: RestConversations.java    From botbuilder-java with MIT License 5 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8",
    "x-ms-logging-context: com.microsoft.bot.schema.Conversations getActivityMembers" })
@GET("v3/conversations/{conversationId}/activities/{activityId}/members")
CompletableFuture<Response<ResponseBody>> getActivityMembers(
    @Path("conversationId") String conversationId,
    @Path("activityId") String activityId,
    @Header("accept-language") String acceptLanguage,
    @Header("User-Agent") String userAgent
);
 
Example #17
Source File: KcaDownloader.java    From kcanotify_h5-master with GNU General Public License v3.0 5 votes vote down vote up
@Headers({
        "Accept: application/json",
        "X-Identify: app/kcanotify",
        "Referer: app:/KCA/",
        "Cache-control: no-cache, no-store, must-revalidate",
        "Content-Type: application/x-www-form-urlencoded"
})
@GET("/kcanotify/v.php")
Call<String> getRecentVersion();
 
Example #18
Source File: DouBanServiceApi.java    From v9porn with MIT License 4 votes vote down vote up
@Headers({"Domain-Name: " + Api.DOU_BAN_DOMAIN_NAME})
@GET("/")
Observable<String> listDouBanMeiZhi(@Query("cid") int cid, @Query("page") int page);
 
Example #19
Source File: FreeApi.java    From RxHttp with GNU General Public License v3.0 4 votes vote down vote up
/**
 * 随机一首诗词推荐
 */
@Headers({Header.CACHE_ALIVE_SECOND + ":" + 0})
@GET("recommendPoetry")
Observable<ResponseBean<RecommendPoetryBean>> recommendPoetry();
 
Example #20
Source File: RetrofitService.java    From DanDanPlayForAndroid with MIT License 4 votes vote down vote up
@GET("api/v2/comment/{episodeId}?withRelated=true")
@Headers({"accept-encoding: gzip"})
Observable<DanmuDownloadBean> downloadDanmu(@Path("episodeId") String episodeId);
 
Example #21
Source File: HuaBanServiceApi.java    From v9porn with MIT License 4 votes vote down vote up
@Headers({"Domain-Name: " + Api.HUA_BAN_DOMAIN_NAME})
@GET("/findPictures")
Observable<String> findPictures(@Query("categoryId") int categoryId, @Query("page") int page, @Query("pageSize") int pageSize);
 
Example #22
Source File: HuaBanServiceApi.java    From v9porn with MIT License 4 votes vote down vote up
@Headers({"Domain-Name: " + Api.HUA_BAN_DOMAIN_NAME})
@GET("/findPictures")
Observable<String> findPictures(@Query("categoryId") int categoryId, @Query("page") int page, @Query("pageSize") int pageSize);
 
Example #23
Source File: SaleService.java    From Hands-Chopping with Apache License 2.0 4 votes vote down vote up
@Headers({DOMAIN_NAME_HEADER+SANKO_DOMAIN})
@GET("v5/home.json?locale=js&sonkwo_version=1&sonkwo_client=web&q%5B%5D=sale_tagged_games")
Observable<GameSaleList> getSankoSaleGames(@Query("_") String timestamp);
 
Example #24
Source File: IShuqiApi.java    From HaoReader with GNU General Public License v3.0 4 votes vote down vote up
@GET("/webapi/book/chapterlist.php")
@Headers("Content-Type:application/x-www-form-urlencoded")
Observable<Response<String>> getChapterList(@QueryMap Map<String, String> fieldMap);
 
Example #25
Source File: KeDouServiceApi.java    From v9porn with MIT License 4 votes vote down vote up
@Headers({"Domain-Name: " + Api.KE_DOU_WO_DOMAIN_NAME})
@GET
Observable<String> videoRelated(@Url String url, @Header("X-Forwarded-For") String ipAddress);
 
Example #26
Source File: DetailService.java    From Hands-Chopping with Apache License 2.0 4 votes vote down vote up
@Headers({DOMAIN_NAME_HEADER+STEAM_DOMAIN_NAME})
@GET("/bundle/{id}/{name}/")
Observable<GameDetailBean> getSteamGameDetailForBundle(@Path("id") String id,@Path("name") String name);
 
Example #27
Source File: MeiZiTuServiceApi.java    From v9porn with MIT License 4 votes vote down vote up
@Headers({"Referer: " + Api.APP_MEIZITU_DOMAIN,
        "Domain-Name: " + Api.MEI_ZI_TU_DOMAIN_NAME})
@GET("hot/page/{page}/")
Observable<String> meiZiTuHot(@Path("page") int page);
 
Example #28
Source File: DetailService.java    From Hands-Chopping with Apache License 2.0 4 votes vote down vote up
/**
 * 游戏详情
 */
@Headers({DOMAIN_NAME_HEADER+SANKO_DOMAIN_NAME})
@GET("/products/{id}.json?locale=js&sonkwo_version=1&sonkwo_client=web")
Observable<GameDetailBean> getSankoGameReviews(@Path("id") String id , @Query("_") String timestamp);
 
Example #29
Source File: RetrofitService.java    From mutual-tls-ssl with Apache License 2.0 4 votes vote down vote up
@GET(HELLO_ENDPOINT)
@Headers(Constants.HEADER_KEY_CLIENT_TYPE + ": retrofit")
Call<String> getHello();
 
Example #30
Source File: ApiService.java    From pandora with Apache License 2.0 4 votes vote down vote up
@Headers({
        "Accept-Encoding: gzip"
})
@GET("/gzip")
Call<Void> gzip();