當前位置: 首頁>>代碼示例>>Java>>正文


Java PUT類代碼示例

本文整理匯總了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");
  }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:17,代碼來源:RequestBuilderTest.java

示例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);
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:3,代碼來源:ApiService.java

示例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");
  }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:16,代碼來源:RequestBuilderTest.java

示例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);
 
開發者ID:Azure,項目名稱:azure-libraries-for-java,代碼行數:4,代碼來源:AppServiceEnvironmentsInner.java

示例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);
 
開發者ID:Azure,項目名稱:autorest.java,代碼行數:4,代碼來源:LROsInner.java

示例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);
 
開發者ID:Azure,項目名稱:azure-libraries-for-java,代碼行數:4,代碼來源:RoutesInner.java

示例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);
 
開發者ID:Azure,項目名稱:autorest.java,代碼行數:4,代碼來源:DictionarysImpl.java

示例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);
 
開發者ID:Azure,項目名稱:azure-libraries-for-java,代碼行數:4,代碼來源:NamespacesInner.java

示例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);
 
開發者ID:Azure,項目名稱:autorest.java,代碼行數:4,代碼來源:PrimitivesImpl.java

示例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);
 
開發者ID:Azure,項目名稱:autorest.java,代碼行數:4,代碼來源:HttpClientFailuresImpl.java

示例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);
 
開發者ID:Azure,項目名稱:autorest.java,代碼行數:4,代碼來源:LROsImpl.java

示例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);
 
開發者ID:Azure,項目名稱:autorest.java,代碼行數:4,代碼來源:LROsInner.java

示例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);
 
開發者ID:Azure,項目名稱:autorest.java,代碼行數:4,代碼來源:LROSADsInner.java

示例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);
 
開發者ID:Azure,項目名稱:azure-libraries-for-java,代碼行數:4,代碼來源:VirtualMachineSchedulesInner.java


注:本文中的retrofit2.http.PUT類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。