retrofit2.http.Body类的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(332)

本文整理了Java中retrofit2.http.Body类的一些代码示例,展示了Body类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Body类的具体详情如下:
包路径:retrofit2.http.Body
类名称:Body

Body介绍

暂无

代码示例

代码示例来源:origin: square/retrofit

@POST("/")
Call<ResponseBody> sendNormal(@Body Repo repo);
@POST("/")

代码示例来源:origin: com.microsoft.azure.policy.v2016_12_01/azure-mgmt-policy

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.policy.v2016_12_01.PolicyAssignments createById" })
@PUT("{policyAssignmentId}")
Observable<Response<ResponseBody>> createById(@Path(value = "policyAssignmentId", encoded = true) String policyAssignmentId, @Body PolicyAssignmentInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

代码示例来源:origin: north2016/T-MVP

@PUT("users/{uid}")
Flowable<CreatedResult> upUser(@Header("X-LC-Session") String session, @Path("uid") String uid, @Body Face face);

代码示例来源:origin: north2016/T-MVP

@Headers("Content-Type: image/png")
@POST("files/{name}")
Flowable<CreatedResult> upFile(@Path("name") String name, @Body RequestBody body);

代码示例来源:origin: allure-framework/allure2

@POST("api/2/issue/{issueKey}/comment")
Response<ResponseBody> createIssueComment(@Path("issueKey") String issueKey, @Body JiraIssueComment comment);

代码示例来源:origin: influxdata/influxdb-java

/**
 * @param username u: optional The username for authentication
 * @param password p: optional The password for authentication
 * @param database db: required The database to write points
 * @param retentionPolicy rp: optional The retention policy to write points.
 *                            If not specified, the autogen retention
 * @param precision optional The precision of the time stamps (n, u, ms, s, m, h).
 *                           If not specified, n
 * @param consistency optional The write consistency level required for the write to succeed.
 *                             Can be one of one, any, all, quorum. Defaults to all.
 */
@POST("write")
public Call<ResponseBody> writePoints(@Query(DB) String database,
  @Query(RP) String retentionPolicy, @Query(PRECISION) String precision,
  @Query(CONSISTENCY) String consistency, @Body RequestBody batchPoints);

代码示例来源:origin: hidroh/materialistic

@POST("repos/hidroh/materialistic/issues")
  @Headers("Authorization: token " + BuildConfig.GITHUB_TOKEN)
  Observable<Object> createGithubIssue(@Body Issue issue);
}

代码示例来源:origin: jgilfelt/chuck

@PUT("/put")
Call<Void> put(@Body Data body);
@DELETE("/delete")

代码示例来源:origin: ribot/ribot-app-android

@POST("check-ins")
Observable<CheckIn> checkIn(@Header(AUTH_HEADER) String authorization,
              @Body CheckInRequest checkInRequest);

代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.PolicySetDefinitions createOrUpdate" })
@PUT("subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}")
Observable<Response<ResponseBody>> createOrUpdate(@Path("policySetDefinitionName") String policySetDefinitionName, @Path("subscriptionId") String subscriptionId, @Body PolicySetDefinitionInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

代码示例来源: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: line/armeria

@POST("/post")
@Headers("content-type: application/json; charset=UTF-8")
CompletableFuture<Response<Void>> post(@Body Pojo pojo);

代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.PolicySetDefinitions createOrUpdateAtManagementGroup" })
@PUT("providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}")
Observable<Response<ResponseBody>> createOrUpdateAtManagementGroup(@Path("policySetDefinitionName") String policySetDefinitionName, @Path("managementGroupId") String managementGroupId, @Body PolicySetDefinitionInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

代码示例来源:origin: Graylog2/graylog2-server

@POST("system/jobs")
  Call trigger(@Body TriggerRequest tr);
}

代码示例来源: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 createOrUpdate" })
@PUT("subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}")
Observable<Response<ResponseBody>> createOrUpdate(@Path("policyDefinitionName") String policyDefinitionName, @Path("subscriptionId") String subscriptionId, @Body PolicyDefinitionInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

代码示例来源:origin: smuyyh/BookReader

/**
 * 第三方登陆
 *
 * @param platform_uid
 * @param platform_token
 * @param platform_code  “QQ”
 * @return
 */
@POST("/user/login")
Observable<Login> login(@Body LoginReq loginReq);

代码示例来源:origin: com.microsoft.azure/azure-mgmt-monitor

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.monitor.DiagnosticSettings createOrUpdate" })
@PUT("{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}")
Observable<Response<ResponseBody>> createOrUpdate(@Path(value = "resourceUri", encoded = true) String resourceUri, @Path("name") String name, @Query("api-version") String apiVersion, @Body DiagnosticSettingsResourceInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

代码示例来源:origin: square/retrofit

@POST("/")
 Call<ResponseBody> sendChunked(@Chunked @Body Repo repo);
}

代码示例来源:origin: com.microsoft.azure.resources.v2018_02_01/azure-mgmt-resources

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.v2018_02_01.ResourceGroups createOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}")
Observable<Response<ResponseBody>> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ResourceGroupInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

代码示例来源:origin: Pay-Group/best-pay-sdk

/**
   * 订单查询
   * @param body
   * @return
   */
  @POST("/pay/orderquery")
  Call<WxOrderQueryResponse> orderquery(@Body RequestBody body);
}

相关文章