类retrofit2.http.HEAD源码实例Demo

下面列出了怎么用retrofit2.http.HEAD的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: kaif-android   文件: RetrofitServiceProcessor.java
@Override
public Set<String> getSupportedAnnotationTypes() {
  Set<String> annotations = new LinkedHashSet<String>();
  annotations.add(GET.class.getCanonicalName());
  annotations.add(PUT.class.getCanonicalName());
  annotations.add(POST.class.getCanonicalName());
  annotations.add(DELETE.class.getCanonicalName());
  annotations.add(HEAD.class.getCanonicalName());
  return annotations;
}
 
源代码2 项目: azure-libraries-for-java   文件: ResourcesInner.java
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Resources checkExistence" })
@HEAD("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}")
Observable<Response<Void>> checkExistence(@Path("resourceGroupName") String resourceGroupName, @Path("resourceProviderNamespace") String resourceProviderNamespace, @Path(value = "parentResourcePath", encoded = true) String parentResourcePath, @Path(value = "resourceType", encoded = true) String resourceType, @Path("resourceName") String resourceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
源代码3 项目: azure-libraries-for-java   文件: ResourcesInner.java
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Resources checkExistenceById" })
@HEAD("{resourceId}")
Observable<Response<Void>> checkExistenceById(@Path(value = "resourceId", encoded = true) String resourceId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.ResourceGroups checkExistence" })
@HEAD("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}")
Observable<Response<Void>> checkExistence(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.DatabaseAccounts checkNameExists" })
@HEAD("providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}")
Observable<Response<Void>> checkNameExists(@Path("accountName") String accountName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
源代码6 项目: tenor-android-core   文件: IApiClient.java
@HEAD
Call<Void> getImageSize(@Url String imageUrl);
 
源代码7 项目: wES   文件: EsService.java
@HEAD("{index}/{type}/{id}")
public Call<Void> exists(@Path("index") String index, @Path("type") String type, @Path("id") String id);
 
源代码8 项目: wES   文件: EsService.java
@HEAD("{index}")
public Call<Void> indices_exists(@Path("index") String index);
 
源代码9 项目: wES   文件: EsService.java
@HEAD("_alias/{name}")
public Call<Void> indices_exists_alias(@Path("name") String name);
 
源代码10 项目: wES   文件: EsService.java
@HEAD("{index}/_alias/{name}")
public Call<Void> indices_exists_alias(@Path("index") String index, @Path("name") String name);
 
源代码11 项目: wES   文件: EsService.java
@HEAD("{index}/_alias")
public Call<Void> indices_exists_alias2(@Path("index") String index);
 
源代码12 项目: wES   文件: EsService.java
@HEAD("_template/{name}")
public Call<Void> indices_exists_template(@Path("name") String name);
 
源代码13 项目: wES   文件: EsService.java
@HEAD("{index}/_mapping/{type}")
public Call<Void> indices_exists_type(@Path("index") String index, @Path("type") String type);
 
源代码14 项目: wES   文件: EsService.java
@HEAD("")
public Call<Void> ping();
 
@HEAD("/foo")
CompletableFuture<Void> headFoo();
 
@HEAD("/head")
Call<Void> head();
 
private void parseMethodAnnotation(Annotation annotation) {
    if (annotation instanceof DELETE) {
        parseHttpMethodAndPath("DELETE", ((DELETE) annotation).value(), false);
    } else if (annotation instanceof GET) {
        parseHttpMethodAndPath("GET", ((GET) annotation).value(), false);
    } else if (annotation instanceof POST) {
        parseHttpMethodAndPath("POST", ((POST) annotation).value(), true);
    } else if (annotation instanceof PUT) {
        parseHttpMethodAndPath("PUT", ((PUT) annotation).value(), true);
    } else if (annotation instanceof HEAD) {
        parseHttpMethodAndPath("HEAD", ((HEAD) annotation).value(), false);
    } else if (annotation instanceof HTTP) {
        HTTP http = (HTTP) annotation;
        parseHttpMethodAndPath(http.method(), http.path(), http.hasBody());
    } else if (annotation instanceof Multipart) {
        if (isFormEncoded) {
            throw methodError(method, "Only one encoding annotation is allowed.");
        }
        isMultipart = true;
    } else if (annotation instanceof FormUrlEncoded) {
        if (isMultipart) {
            throw methodError(method, "Only one encoding annotation is allowed.");
        }
        isFormEncoded = true;
    } else if (annotation instanceof Streaming) {
        Log.v(TAG, "streaming interface");
    } else if (annotation instanceof retrofit2.http.Headers) {
        String[] headersToParse = ((retrofit2.http.Headers) annotation).value();
        if (headersToParse.length == 0) {
            throw methodError(method, "@Headers annotation is empty.");
        }
        headers = parseHeaders(headersToParse);
    } else if(annotation instanceof FormUrlEncoded) {
        //formUrlEncoded = true;
        Log.v(TAG, "FormUrlEncoded request");
    } else if(annotation instanceof NextcloudAPI.FollowRedirects) {
        followRedirects = true;
    } else {
        throw new UnsupportedOperationException(String.valueOf(annotation));
    }
}