Package org.apache.http.client.methods

Examples of org.apache.http.client.methods.HttpHead.addHeader()


    private HttpHead doHead() {
        HttpHead method = new HttpHead(requestURI);

        for (Header header : headers) {
            method.addHeader(header);
        }

        return method;
    }
View Full Code Here


      String url = String.format(configurer.getArtifactVersionRepositoryPomUrl(),
          artifactVersionBean.getGroupId().replace(".", "/"),
          artifactVersionBean.getArtifactId(),
          artifactVersionBean.getVersion());
      HttpHead httpHead = new HttpHead(url);
      httpHead.addHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_CLOSE);
     
      // The possible errors here are considered as secondary and will not be seen by the user
      // We may want to reconsider it
      HttpResponse response = client.execute(httpHead);
      Header lastUpdateDate = response.getFirstHeader(LAST_MODIFIED_HEADER);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.