本文整理了Java中retrofit2.http.Header
类的一些代码示例,展示了Header
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Header
类的具体详情如下:
包路径:retrofit2.http.Header
类名称:Header
暂无
代码示例来源:origin: jaydenxiao2016/AndroidFire
@GET("nc/article/{postId}/full.html")
Observable<Map<String, NewsDetail>> getNewDetail(
@Header("Cache-Control") String cacheControl,
@Path("postId") String postId);
代码示例来源:origin: square/retrofit
String name = path.value();
validatePathName(p, name);
return new ParameterHandler.Path<>(method, p, name, converter, path.encoded());
String name = query.value();
boolean encoded = query.encoded();
validateResolvableType(p, type);
Header header = (Header) annotation;
String name = header.value();
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.PolicyDefinitions getBuiltIn" })
@GET("providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}")
Observable<Response<ResponseBody>> getBuiltIn(@Path("policyDefinitionName") String policyDefinitionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
代码示例来源:origin: org.nuxeo.client/nuxeo-java-client
@Headers(HttpHeaders.CONTENT_TYPE_APPLICATION_OCTET_STREAM)
@POST("upload/{batchId}/{fileIdx}")
Call<BatchUpload> upload(@Header("X-File-Name") String filename, @Header("X-File-Size") long fileSize,
@Header("X-File-Type") String fileType, @Header("X-Upload-Type") String uploadType,
@Header("X-Upload-Chunk-Index") long uploadChunkIndex, @Header("X-Upload-Chunk-Count") long totalChunkCount,
@Path("batchId") String batchId, @Path("fileIdx") String fileIdx, @Body RequestBody blob);
代码示例来源:origin: jgilfelt/chuck
@GET("/image")
Call<Void> image(@Header("Accept") String accept);
@GET("/gzip")
代码示例来源:origin: ribot/ribot-app-android
@GET("ribots")
Observable<List<Ribot>> getRibots(@Header(AUTH_HEADER) String authorization,
@Query("embed") String embed);
代码示例来源:origin: north2016/T-MVP
@PUT("users/{uid}")
Flowable<CreatedResult> upUser(@Header("X-LC-Session") String session, @Path("uid") String uid, @Body Face face);
代码示例来源:origin: ribot/ribot-app-android
@POST("/beacons/{beaconId}/encounters")
Observable<Encounter> performBeaconEncounter(@Header(AUTH_HEADER) String authorization,
@Path("beaconId") String beaconId);
代码示例来源:origin: ribot/ribot-app-android
@POST("check-ins")
Observable<CheckIn> checkIn(@Header(AUTH_HEADER) String authorization,
@Body CheckInRequest checkInRequest);
代码示例来源:origin: line/armeria
@POST("/postCustomContentType")
CompletableFuture<Response<Void>> postCustomContentType(
@Header("Content-Type") @Nullable String contentType);
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.PolicyDefinitions list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
代码示例来源:origin: org.nuxeo.client/nuxeo-java-client
/**
* @deprecated since 3.1, use {@link #upload(String, long, String, String, long, long, String, String, RequestBody)}
* instead
*/
@Deprecated
@Headers(HttpHeaders.CONTENT_TYPE_APPLICATION_OCTET_STREAM)
@POST("upload/{batchId}/{fileIdx}")
Call<BatchUpload> upload(@Header("X-File-Name") String filename, @Header("X-File-Size") String fileSize,
@Header("X-File-Type") String fileType, @Header("X-Upload-Type") String uploadType,
@Header("X-Upload-Chunk-Index") String uploadChunkIndex,
@Header("X-Upload-Chunk-Count") String totalChunkCount, @Path("batchId") String batchId,
@Path("fileIdx") String fileIdx, @Body RequestBody file);
代码示例来源:origin: jgilfelt/chuck
@GET("/cache")
Call<Void> cache(@Header("If-Modified-Since") String ifModifiedSince);
@GET("/cache/{seconds}")
代码示例来源:origin: ribot/ribot-app-android
@PUT("check-ins/{checkInId}")
Observable<CheckIn> updateCheckIn(@Header(AUTH_HEADER) String authorization,
@Path("checkInId") String checkInId,
@Body UpdateCheckInRequest updateCheckInRequest);
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.PolicyDefinitions listByManagementGroup" })
@GET("providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions")
Observable<Response<ResponseBody>> listByManagementGroup(@Path("managementGroupId") String managementGroupId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
代码示例来源:origin: com.microsoft.azure/azure-mgmt-storage
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.StorageAccounts checkNameAvailability" })
@POST("subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability")
Observable<Response<ResponseBody>> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body StorageAccountCheckNameAvailabilityParameters accountName, @Header("User-Agent") String userAgent);
代码示例来源:origin: jaydenxiao2016/AndroidFire
@GET("data/福利/{size}/{page}")
Observable<GirlData> getPhotoList(
@Header("Cache-Control") String cacheControl,
@Path("size") int size,
@Path("page") int page);
代码示例来源:origin: jaydenxiao2016/AndroidFire
@GET
Observable<ResponseBody> getNewsBodyHtmlPhoto(
@Header("Cache-Control") String cacheControl,
@Url String photoPath);
//@Url,它允许我们直接传入一个请求的URL。这样以来我们可以将上一个请求的获得的url直接传入进来,baseUrl将被无视
代码示例来源:origin: com.squareup.retrofit2/retrofit
String name = path.value();
validatePathName(p, name);
return new ParameterHandler.Path<>(name, converter, path.encoded());
String name = query.value();
boolean encoded = query.encoded();
validateResolvableType(p, type);
Header header = (Header) annotation;
String name = header.value();
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Features list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.Features/features")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
内容来源于网络,如有侵权,请联系作者删除!