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


Java Body類代碼示例

本文整理匯總了Java中retrofit2.http.Body的典型用法代碼示例。如果您正苦於以下問題:Java Body類的具體用法?Java Body怎麽用?Java Body使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Body類屬於retrofit2.http包,在下文中一共展示了Body類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: uploadImage4search

import retrofit2.http.Body; //導入依賴的package包/類
@Headers({
        "Accept:*/*",
        "Accept-Encoding:gzip, deflate",
        "Accept-Language:zh-CN,zh;q=0.8",
        "Connection:keep-alive",
        "Content-Type:text/plain",
        "User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36",
        "X-Requested-With:XMLHttpRequest"
})
@POST("api/upload/auto?")
Observable<ImageUpload> uploadImage4search(@Query("name") String name, @Query("type") String type, @Body String imgs);
 
開發者ID:l465659833,項目名稱:Bigbang,代碼行數:12,代碼來源:PicUploadService.java

示例2: bodyRequired

import retrofit2.http.Body; //導入依賴的package包/類
@Test public void bodyRequired() {
  class Example {
    @POST("/foo/bar/") //
    Call<ResponseBody> method(@Body RequestBody body) {
      return null;
    }
  }
  try {
    buildRequest(Example.class, new Object[] { null });
    fail();
  } catch (IllegalArgumentException e) {
    assertThat(e.getMessage()).isEqualTo("Body parameter value must not be null.");
  }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:15,代碼來源:RequestBuilderTest.java

示例3: sendFriendInvitation

import retrofit2.http.Body; //導入依賴的package包/類
@POST("friendship/invite")
Observable<FriendInvitationResponse> sendFriendInvitation(@Body RequestBody body);
 
開發者ID:GitLqr,項目名稱:LQRWeChat,代碼行數:3,代碼來源:MyApi.java

示例4: beginCreateFunction

import retrofit2.http.Body; //導入依賴的package包/類
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.WebApps beginCreateFunction" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}")
Observable<Response<ResponseBody>> beginCreateFunction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @Path("subscriptionId") String subscriptionId, @Body FunctionEnvelopeInner functionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
開發者ID:Azure,項目名稱:azure-libraries-for-java,代碼行數:4,代碼來源:WebAppsInner.java

示例5: getShopInfo

import retrofit2.http.Body; //導入依賴的package包/類
@POST("/api/sale/shop/info")
Observable<ShopInfoResponse> getShopInfo(@Body EmptyRequest emptyRequest);
 
開發者ID:ebridfighter,項目名稱:GongXianSheng,代碼行數:3,代碼來源:RunwiseService.java

示例6: beginUpdate

import retrofit2.http.Body; //導入依賴的package包/類
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cdn.Endpoints beginUpdate" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}")
Observable<Response<ResponseBody>> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("endpointName") String endpointName, @Path("subscriptionId") String subscriptionId, @Body EndpointUpdateParametersInner endpointUpdateProperties, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
開發者ID:Azure,項目名稱:azure-libraries-for-java,代碼行數:4,代碼來源:EndpointsInner.java

示例7: regenerateKey

import retrofit2.http.Body; //導入依賴的package包/類
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.DatabaseAccounts regenerateKey" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey")
Observable<Response<ResponseBody>> regenerateKey(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DatabaseAccountRegenerateKeyParameters keyToRegenerate, @Header("User-Agent") String userAgent);
 
開發者ID:Azure,項目名稱:azure-libraries-for-java,代碼行數:4,代碼來源:DatabaseAccountsInner.java

示例8: updateApplicationAttributes

import retrofit2.http.Body; //導入依賴的package包/類
@Headers({ "Accept: application/json", "Content-Type:application/json" })
@PUT("api/v1/projectVersions/{parentId}/attributes")
Call<ResponseBody> updateApplicationAttributes(@Path("parentId") int parentId, @Body List<UpdateFortifyApplicationAttributesRequest> request);
 
開發者ID:blackducksoftware,項目名稱:hub-fortify-ssc-integration-service,代碼行數:4,代碼來源:FortifyApplicationVersionApiService.java

示例9: update

import retrofit2.http.Body; //導入依賴的package包/類
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs update" })
@PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}")
Observable<Response<ResponseBody>> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Body StreamingJobInner streamingJob, @Header("If-Match") String ifMatch, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
開發者ID:Azure,項目名稱:azure-libraries-for-java,代碼行數:4,代碼來源:StreamingJobsInner.java

示例10: getWalletPubKey

import retrofit2.http.Body; //導入依賴的package包/類
@Headers({"Content-Type: application/json","User-Agent: JPascalCoin"})
@POST("/")
   Call<OpResult<PublicKey>> getWalletPubKey(@Body Map<String, Object> body);
 
開發者ID:davidbolet,項目名稱:JPascalCoin,代碼行數:4,代碼來源:PascalCoinService.java

示例11: login

import retrofit2.http.Body; //導入依賴的package包/類
@GET
Observable<LoginResponse> login(@Body LoginRequest request);
 
開發者ID:Pingsh,項目名稱:Mix,代碼行數:3,代碼來源:API.java

示例12: cardCheckoutValidate

import retrofit2.http.Body; //導入依賴的package包/類
@POST("card/checkout/validate")
Call<CheckoutValidateResponse> cardCheckoutValidate(@Body HashMap<String, Object> body);
 
開發者ID:aksalj,項目名稱:africastalking-java,代碼行數:3,代碼來源:IPayment.java

示例13: sendChunked

import retrofit2.http.Body; //導入依賴的package包/類
@POST("/")
Call<ResponseBody> sendChunked(@Chunked @Body Repo repo);
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:3,代碼來源:ChunkingConverter.java

示例14: toggleReplyFavourite

import retrofit2.http.Body; //導入依賴的package包/類
@POST("activity/reply/like")
Call<ResponseBody> toggleReplyFavourite(@Body Payload.ActionIdBased payload);
 
開發者ID:wax911,項目名稱:anitrend-app,代碼行數:3,代碼來源:UserModel.java

示例15: beginGrantAccess

import retrofit2.http.Body; //導入依賴的package包/類
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Disks beginGrantAccess" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess")
Observable<Response<ResponseBody>> beginGrantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body GrantAccessDataInner grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
開發者ID:Azure,項目名稱:azure-libraries-for-java,代碼行數:4,代碼來源:DisksInner.java


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