Package org.apache.http.client.methods

Examples of org.apache.http.client.methods.HttpHead


    public static Request Head(final URI uri) {
        return new Request(new HttpHead(uri));
    }

    public static Request Head(final String uri) {
        return new Request(new HttpHead(uri));
    }
View Full Code Here


            meta = new RequestMeta();
        }
        if (meta.getQueryParam(Constants.QP_R) == null) {
            meta.setQueryParam(Constants.QP_R, Constants.DEFAULT_R.toString());
        }
        HttpHead head = new HttpHead(ClientUtils.makeURI(config, bucket, key));
        return executeMethod(bucket, key, head, meta);
    }
View Full Code Here

            meta = new RequestMeta();
        }
        if (meta.getQueryParam(Constants.QP_R) == null) {
            meta.setQueryParam(Constants.QP_R, Constants.DEFAULT_R.toString());
        }
        HttpHead head = new HttpHead(ClientUtils.makeURI(config, bucket, key));
        return executeMethod(bucket, key, head, meta);
    }
View Full Code Here

        } else if (strMethod.equals("PUT")) {
            request = new HttpPut(uri);
        } else if (strMethod.equals("DELETE")) {
            request = new HttpDelete(uri);
        } else if (strMethod.equals("HEAD")) {
            request = new HttpHead(uri);
        } else if (strMethod.equals("OPTIONS")) {
            request = new HttpOptions(uri);
        } else {
            request = new HttpEntityEnclosingRequestBase() {
                @Override
View Full Code Here

        } else if (request.getHttpMethod() == HttpMethodName.GET) {
            httpRequest = new HttpGet(uri);
        } else if (request.getHttpMethod() == HttpMethodName.DELETE) {
            httpRequest = new HttpDelete(uri);
        } else if (request.getHttpMethod() == HttpMethodName.HEAD) {
            httpRequest = new HttpHead(uri);
        } else {
            throw new AmazonClientException("Unknown HTTP method name: " + request.getHttpMethod());
        }

        configureHeaders(httpRequest, request, context, clientConfiguration);
View Full Code Here

        }
        httpMethod = enclosingMethod;
      } else if ("GET".equals(methodType)) {
        httpMethod = new HttpGet(requestUri);
      } else if ("HEAD".equals(methodType)) {
        httpMethod = new HttpHead(requestUri);
      } else if ("DELETE".equals(methodType)) {
        httpMethod = new HttpDelete(requestUri);
      }
      for (Map.Entry<String, List<String>> entry : request.getHeaders().entrySet()) {
        httpMethod.addHeader(entry.getKey(), Joiner.on(',').join(entry.getValue()));
View Full Code Here

                    break;
                case DELETE:
                    method = new HttpDelete(urlStr);
                    break;
                case HEAD:
                    method = new HttpHead(urlStr);
                    break;
                case OPTIONS:
                    method = new HttpOptions(urlStr);
                    break;
                case TRACE:
View Full Code Here

  }

  @Override
  public boolean exists(String url) throws IOException
  {
    HttpHead head = new HttpHead(url);
    return this.execute(head, new ExistsResponseHandler());
  }
View Full Code Here

    } else if(method.equals("TRACE")) {
      return new HttpTrace(uri);
    } else if(method.equals("OPTIONS")) {
      return new HttpOptions(uri);
    } else if(method.equals("HEAD")) {
      return new HttpHead(uri);
    }
    throw new RestfulieException("You can not " + method + " to " + uri + ", there is no such verb in the apache http API.");
  }
View Full Code Here

      break;
    case OPTIONS:
      reqObj = new HttpOptions(urlToRequest);
      break;
    case HEAD:
      reqObj = new HttpHead(urlToRequest);
      break;
    }
   
    Set<Entry<String, List<String>>> entrySet = request.getHeaders().entrySet();
    for(Entry<String, List<String>> entry : entrySet) {
View Full Code Here

TOP

Related Classes of org.apache.http.client.methods.HttpHead

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.