本文整理汇总了Java中retrofit2.http.PUT类的典型用法代码示例。如果您正苦于以下问题:Java PUT类的具体用法?Java PUT怎么用?Java PUT使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PUT类属于retrofit2.http包,在下文中一共展示了PUT类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: bodyInNonBodyRequest
import retrofit2.http.PUT; //导入依赖的package包/类
@Test public void bodyInNonBodyRequest() {
class Example {
@Multipart //
@PUT("/") //
Call<ResponseBody> method(@Part("one") String o1, @Body String o2) {
return null;
}
}
try {
buildRequest(Example.class);
fail();
} catch (IllegalArgumentException e) {
assertThat(e).hasMessage(
"@Body parameters cannot be used with form or multi-part encoding. (parameter #2)\n for method Example.method");
}
}
示例2: upUser
import retrofit2.http.PUT; //导入依赖的package包/类
@PUT("users/{uid}")
Flowable<CreatedResult> upUser(@Header("X-LC-Session") String session, @Path("uid") String uid, @Body Face face);
示例3: twoBodies
import retrofit2.http.PUT; //导入依赖的package包/类
@Test public void twoBodies() {
class Example {
@PUT("/") //
Call<ResponseBody> method(@Body String o1, @Body String o2) {
return null;
}
}
try {
buildRequest(Example.class);
fail();
} catch (IllegalArgumentException e) {
assertThat(e).hasMessage(
"Multiple @Body method annotations found. (parameter #2)\n for method Example.method");
}
}
示例4: createOrUpdateMultiRolePool
import retrofit2.http.PUT; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.AppServiceEnvironments createOrUpdateMultiRolePool" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default")
Observable<Response<ResponseBody>> createOrUpdateMultiRolePool(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body WorkerPoolResourceInner multiRolePoolEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
示例5:
import retrofit2.http.PUT; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.lro.LROs beginPut201CreatingFailed200" })
@PUT("lro/put/201/created/failed/200")
Observable<Response<ResponseBody>> beginPut201CreatingFailed200(@Body ProductInner product, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
示例6: beginCreateOrUpdate
import retrofit2.http.PUT; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.Routes beginCreateOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}")
Observable<Response<ResponseBody>> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("routeName") String routeName, @Path("subscriptionId") String subscriptionId, @Body RouteInner routeParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
示例7: putComplexValid
import retrofit2.http.PUT; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.bodydictionary.Dictionarys putComplexValid" })
@PUT("dictionary/complex/valid")
Observable<Response<ResponseBody>> putComplexValid(@Body Map<String, Widget> arrayBody);
示例8: createOrUpdateAuthorizationRule
import retrofit2.http.PUT; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.Namespaces createOrUpdateAuthorizationRule" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}")
Observable<Response<ResponseBody>> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SharedAccessAuthorizationRuleInner parameters, @Header("User-Agent") String userAgent);
示例9: putInt
import retrofit2.http.PUT; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.bodycomplex.Primitives putInt" })
@PUT("complex/primitive/integer")
Observable<Response<ResponseBody>> putInt(@Body IntWrapper complexBody);
示例10:
import retrofit2.http.PUT; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.http.HttpClientFailures put400" })
@PUT("http/failure/client/400")
Observable<Response<ResponseBody>> put400(@Body Boolean booleanValue);
示例11: putNonResource
import retrofit2.http.PUT; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.lro.LROs putNonResource" })
@PUT("lro/putnonresource/202/200")
Observable<Response<ResponseBody>> putNonResource(@Body Sku sku, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
示例12: commitApplicationVersion
import retrofit2.http.PUT; //导入依赖的package包/类
@Headers({ "Accept: application/json", "Content-Type:application/json" })
@PUT("api/v1/projectVersions/{id}")
Call<ResponseBody> commitApplicationVersion(@Path("id") int id, @Body CommitFortifyApplicationRequest request);
开发者ID:blackducksoftware,项目名称:hub-fortify-ssc-integration-service,代码行数:4,代码来源:FortifyApplicationVersionApiService.java
示例13: putAsyncNoHeaderInRetry
import retrofit2.http.PUT; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.lro.LROs putAsyncNoHeaderInRetry" })
@PUT("lro/putasync/noheader/201/200")
Observable<Response<ResponseBody>> putAsyncNoHeaderInRetry(@Body ProductInner product, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
示例14:
import retrofit2.http.PUT; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.lro.LROSADs beginPutAsyncRelativeRetryNoStatusPayload" })
@PUT("lro/error/putasync/retry/nostatuspayload")
Observable<Response<ResponseBody>> beginPutAsyncRelativeRetryNoStatusPayload(@Body ProductInner product, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
示例15: createOrUpdate
import retrofit2.http.PUT; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.VirtualMachineSchedules createOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}")
Observable<Response<ResponseBody>> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("virtualMachineName") String virtualMachineName, @Path("name") String name, @Body ScheduleInner schedule, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);