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 Project: botbuilder-java   Author: microsoft   File: RestConversations.java    License: 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 #2
Source Project: botbuilder-java   Author: microsoft   File: RestConversations.java    License: 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 #3
Source Project: botbuilder-java   Author: microsoft   File: RestConversations.java    License: 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 #4
Source Project: v9porn   Author: techGay   File: V9PornServiceApi.java    License: 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 #5
Source Project: botbuilder-java   Author: microsoft   File: RestUserToken.java    License: 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 #6
Source Project: botbuilder-java   Author: microsoft   File: RestConversations.java    License: 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 #7
Source Project: Gander   Author: Ashok-Varma   File: SampleApiService.java    License: 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 #8
Source Project: botbuilder-java   Author: microsoft   File: RestConversations.java    License: 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 #9
Source Project: botbuilder-java   Author: microsoft   File: RestConversations.java    License: 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 #10
Source Project: kcanotify_h5-master   Author: qly5213   File: KcaDownloader.java    License: 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 #11
Source Project: kcanotify_h5-master   Author: qly5213   File: KcaDownloader.java    License: 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 #12
Source Project: kcanotify_h5-master   Author: qly5213   File: KcaDownloader.java    License: 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 #13
Source Project: kcanotify_h5-master   Author: qly5213   File: KcaDownloader.java    License: 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 #14
Source Project: baidu-chain-dog   Author: CoolAcsi   File: PetOperationInvoke.java    License: 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 #15
Source Project: botbuilder-java   Author: microsoft   File: RestConversations.java    License: 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 #16
Source Project: botbuilder-java   Author: microsoft   File: RestConversations.java    License: 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 #17
Source Project: botbuilder-java   Author: microsoft   File: RestConversations.java    License: 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 #18
Source Project: NewsApp   Author: AbhishekChd   File: NewsApi.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Headers("X-Api-Key:" + API_KEY)
@GET("/v2/top-headlines")
Call<ArticleResponseWrapper> getHeadlines(
        @Query("category") String category,
        @Query("country") String country
);
 
Example #19
Source Project: lifecycle-component   Author: LinXueyuanStdio   File: GankService.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * 妹纸列表
 */
@Headers({DOMAIN_NAME_HEADER + GANK_DOMAIN_NAME})
@GET("/api/data/福利/{num}/{page}")
Observable<GankBaseResponse<List<GankItemBean>>> getGirlList(@Path("num") int num, @Path("page") int page);
 
Example #20
Source Project: lifecycle-component   Author: LinXueyuanStdio   File: ZhihuService.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * 最新日报
 */
@Headers({DOMAIN_NAME_HEADER + ZHIHU_DOMAIN_NAME})
@GET("/api/4/news/latest")
Observable<DailyListBean> getDailyList();
 
Example #21
Source Project: RxHttp   Author: goweii   File: FreeApi.java    License: GNU General Public License v3.0 4 votes vote down vote up
/**
 * 获取天气
 */
@Headers({Header.BASE_URL_REDIRECT + ":" + Config.BASE_URL_OTHER_NAME})
@GET("weatherApi?")
Observable<ResponseBean<WeatherBean>> weather(@Query("city") String city);
 
Example #22
Source Project: v9porn   Author: ForLovelj   File: MeiZiTuServiceApi.java    License: MIT License 4 votes vote down vote up
@Headers({"Referer: " + Api.APP_MEIZITU_DOMAIN,
        "Domain-Name: " + Api.MEI_ZI_TU_DOMAIN_NAME})
@GET("xinggan/page/{page}/")
Observable<String> meiZiTuSexy(@Path("page") int page);
 
Example #23
Source Project: v9porn   Author: ForLovelj   File: MeiZiTuServiceApi.java    License: MIT License 4 votes vote down vote up
@Headers({"Referer: " + Api.APP_MEIZITU_DOMAIN,
        "Domain-Name: " + Api.MEI_ZI_TU_DOMAIN_NAME})
@GET("japan/page/{page}/")
Observable<String> meiZiTuJapan(@Path("page") int page);
 
Example #24
Source Project: v9porn   Author: ForLovelj   File: MeiZiTuServiceApi.java    License: MIT License 4 votes vote down vote up
@Headers({"Referer: " + Api.APP_MEIZITU_DOMAIN,
        "Domain-Name: " + Api.MEI_ZI_TU_DOMAIN_NAME})
@GET("taiwan/page/{page}/")
Observable<String> meiZiTuJaiwan(@Path("page") int page);
 
Example #25
Source Project: RxHttp   Author: goweii   File: FreeApi.java    License: GNU General Public License v3.0 4 votes vote down vote up
/**
 * 随机单句诗词推荐
 */
@Headers({Header.CACHE_ALIVE_SECOND + ":" + 10})
@GET("singlePoetry")
Observable<ResponseBean<SinglePoetryBean>> singlePoetry();
 
Example #26
Source Project: v9porn   Author: ForLovelj   File: MeiZiTuServiceApi.java    License: MIT License 4 votes vote down vote up
@Headers({"Referer: " + Api.APP_MEIZITU_DOMAIN,
        "Domain-Name: " + Api.MEI_ZI_TU_DOMAIN_NAME})
@GET("{id}")
Observable<String> meiZiTuImageList(@Path("id") int id);
 
Example #27
Source Project: v9porn   Author: ForLovelj   File: ProxyServiceApi.java    License: MIT License 4 votes vote down vote up
@Headers({"Domain-Name: " + Api.XICI_DAILI_DOMAIN_NAME})
@GET("nn/{page}")
Observable<String> proxyXiciDaili(@Path("page") int page);
 
Example #28
Source Project: v9porn   Author: ForLovelj   File: V9PornServiceApi.java    License: MIT License 4 votes vote down vote up
@Headers({"Domain-Name: " + Api.PORN9_VIDEO_DOMAIN_NAME})
@GET("captcha.php")
Observable<ResponseBody> captcha();
 
Example #29
Source Project: RxHttp   Author: goweii   File: FreeApi.java    License: GNU General Public License v3.0 4 votes vote down vote up
/**
 * 错误地址
 */
@Headers({Header.BASE_URL_REDIRECT + ":" + Config.BASE_URL_ERROR_NAME})
@GET("weatherApi")
Observable<ResponseBean<BaseBean>> errorHost();
 
Example #30
Source Project: Hands-Chopping   Author: noterpopo   File: DetailService.java    License: 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);