下面列出了怎么用retrofit2.http.DELETE的API类实例代码及写法,或者点击链接到github查看源代码。
private static String extractPath(Element element) throws NoAnnotationException {
GET getAnnotation = element.getAnnotation(GET.class);
if (getAnnotation != null) {
return getAnnotation.value();
}
POST postAnnotation = element.getAnnotation(POST.class);
if (postAnnotation != null) {
return postAnnotation.value();
}
DELETE deleteAnnotation = element.getAnnotation(DELETE.class);
if (deleteAnnotation != null) {
return deleteAnnotation.value();
}
PUT putAnnotation = element.getAnnotation(PUT.class);
if (putAnnotation != null) {
return putAnnotation.value();
}
throw new NoAnnotationException();
}
@DELETE("extensionPoint/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE("api/v1/orders/{orderId}")
Call<KucoinResponse<OrderCancelResponse>> cancelOrder(@Path("orderId") String orderId);
@DELETE("physicalHost/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE("haConfigInput/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE
Observable<String> delete(@Url String url, @QueryMap Map<String, Object> params);
@DELETE("/v1/datasets/{dataSetId}")
Call<MDatasetReply> deleteDataSet(@Header(SESSION_TOKEN_HEADER) String token, @Path("dataSetId") String id);
@DELETE("/api/multi/multipath")
Call<String> deleteMultiReddit(@HeaderMap Map<String, String> headers, @Query("multipath") String multipath);
@DELETE("competitions/{competition_id}")
Call<DeleteCompetitionResponse> deleteCompetition(@Path("competition_id") String comp_id);
@DELETE("drafts/{draft_id}")
Call<DraftUploadResponse> deleteDraft(@Path("draft_id") long draftId);
@DELETE("rackspaceConfig/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE("azureConfig/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE(UrlCollection.UNSPLASH_NODE_API_URL + "users/{username}/follow")
Observable<ResponseBody> cancelFollow(@Path("username") String username);
@DELETE("backupTarget/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE("subscribe/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE("externalStoragePoolEvent/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE("/user/starred/{user}/{repo}")
Single<Void> deleteStar(@Header("Authorization") String authorization,
@Path("user") String user,
@Path("repo") String repo);
@DELETE("/api/v1/entries/sgv.json")
Call<ResponseBody> deleteCleanupItemsNonKeyed(@Query("find[date][$gte]") String from,
@Query("find[date][$lte]") String to,
@Query("find[key600][$not][$exists]") String empty);
@DELETE("dockerBuild/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE("dnsService/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE("/v1/users/{user_id}/follow")
Observable<Response<Body>> unfollow(@Path("user_id") long userId);
@DELETE("v1/shots/{shot}/comments/{id}")
Call<Void> deleteComment(@Path("shot") long shotId,
@Path("id") long commentId);
@DELETE("delete")
Call<Result<String>> deleteBlog(@Query("id") String id);
@DELETE("pullTask/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE
Observable<Object> deleteFile(@Url String url);
@DELETE("/apis/{api}/plugins/{id}")
Call<Void> deletePluginForApi(@Path("api") String apiNameOrId, @Path("id") String pluginNameOrId);
@DELETE("instance/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE("ldapconfig/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE("containerExec/{id}")
Call<Response> delete(@Path("id") String id);
@DELETE("registrationToken/{id}")
Call<Response> delete(@Path("id") String id);