当前位置: 首页>>代码示例>>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;未经允许,请勿转载。