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


Java Path類代碼示例

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


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

示例1: getWithUnusedAndInvalidNamedPathParam

import retrofit2.http.Path; //導入依賴的package包/類
@Test public void getWithUnusedAndInvalidNamedPathParam() {
  class Example {
    @GET("/foo/bar/{ping}/{kit,kat}/") //
    Call<ResponseBody> method(@Path("ping") String ping) {
      return null;
    }
  }
  Request request = buildRequest(Example.class, "pong");
  assertThat(request.method()).isEqualTo("GET");
  assertThat(request.headers().size()).isZero();
  assertThat(request.url().toString()).isEqualTo("http://example.com/foo/bar/pong/%7Bkit,kat%7D/");
  assertThat(request.body()).isNull();
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:14,代碼來源:RequestBuilderTest.java

示例2: getMSDeployStatus

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

示例3: create

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

示例4: getMultiplePagesWithOffset

import retrofit2.http.Path; //導入依賴的package包/類
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.paging.Pagings getMultiplePagesWithOffset" })
@GET("paging/multiple/withpath/{offset}")
Observable<Response<ResponseBody>> getMultiplePagesWithOffset(@Path("offset") int offset, @Header("client-request-id") String clientRequestId, @Header("accept-language") String acceptLanguage, @Header("maxresults") Integer maxresults, @Header("timeout") Integer timeout, @Header("User-Agent") String userAgent);
 
開發者ID:Azure,項目名稱:autorest.java,代碼行數:4,代碼來源:PagingsImpl.java

示例5: updateComponent

import retrofit2.http.Path; //導入依賴的package包/類
@PUT("rest/api/2/component/{id}")
Call<Void> updateComponent(@Path("id") int id, @Body Component component);
 
開發者ID:ThoughtsLive,項目名稱:jira-steps,代碼行數:3,代碼來源:JiraEndPoints.java

示例6: getTags

import retrofit2.http.Path; //導入依賴的package包/類
@NonNull @GET("repos/{owner}/{repo}/tags")
Single<Pageable<BranchesModel>> getTags(@NonNull @Path("owner") String owner, @NonNull @Path("repo") String repo,
                                            @Query("page") int page);
 
開發者ID:duyp,項目名稱:mvvm-template,代碼行數:4,代碼來源:RepoService.java

示例7: get

import retrofit2.http.Path; //導入依賴的package包/類
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.LoadBalancerBackendAddressPools get" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}")
Observable<Response<ResponseBody>> get(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("backendAddressPoolName") String backendAddressPoolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
開發者ID:Azure,項目名稱:azure-libraries-for-java,代碼行數:4,代碼來源:LoadBalancerBackendAddressPoolsInner.java

示例8: getImgs

import retrofit2.http.Path; //導入依賴的package包/類
@GET("福利/count/{count}/page/{page}")
Observable<ImageBean> getImgs(@Path("count") int count, @Path("page") int page);
 
開發者ID:guzhigang001,項目名稱:QNewsDemo,代碼行數:3,代碼來源:QNewsService.java

示例9: listByResourceGroup

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

示例10: run

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

示例11: dateTimeValid

import retrofit2.http.Path; //導入依賴的package包/類
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.url.Paths dateTimeValid" })
@GET("paths/datetime/2012-01-01T01%3A01%3A01Z/{dateTimePath}")
Observable<Response<ResponseBody>> dateTimeValid(@Path("dateTimePath") DateTime dateTimePath);
 
開發者ID:Azure,項目名稱:autorest.java,代碼行數:4,代碼來源:PathsImpl.java

示例12: userSearch

import retrofit2.http.Path; //導入依賴的package包/類
@GET("user/search/{name}")
Call<RspModel<List<UserCard>>> userSearch(@Path("name") String name);
 
開發者ID:FZZFVII,項目名稱:pipe,代碼行數:3,代碼來源:RemoteService.java

示例13: getDatabases

import retrofit2.http.Path; //導入依賴的package包/類
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.RecommendedElasticPools getDatabases" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases/{databaseName}")
Observable<Response<ResponseBody>> getDatabases(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("recommendedElasticPoolName") String recommendedElasticPoolName, @Path("databaseName") String databaseName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
開發者ID:Azure,項目名稱:azure-libraries-for-java,代碼行數:4,代碼來源:RecommendedElasticPoolsInner.java

示例14: isFollowing

import retrofit2.http.Path; //導入依賴的package包/類
@GET("user/following/{user}")
Call<Void> isFollowing(@Header("Authorization") String credentials, @Path("user") String user);
 
開發者ID:llvieira,項目名稱:GHCli,代碼行數:3,代碼來源:IGitHubUser.java

示例15: restore

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


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