Class ApacheHttpClient

  • All Implemented Interfaces:
    HttpClient<org.apache.http.HttpResponse>

    public class ApacheHttpClient
    extends java.lang.Object
    implements HttpClient<org.apache.http.HttpResponse>
    • Constructor Detail

      • ApacheHttpClient

        public ApacheHttpClient()
    • Method Detail

      • setUri

        public HttpClient<org.apache.http.HttpResponse> setUri​(java.net.URI uri)
        Specified by:
        setUri in interface HttpClient<org.apache.http.HttpResponse>
      • setFollowRedirects

        public HttpClient<org.apache.http.HttpResponse> setFollowRedirects​(boolean redirects)
        Specified by:
        setFollowRedirects in interface HttpClient<org.apache.http.HttpResponse>
      • setBasicAuthCredentials

        public HttpClient<org.apache.http.HttpResponse> setBasicAuthCredentials​(java.lang.String username,
                                                                                java.lang.String password)
        Specified by:
        setBasicAuthCredentials in interface HttpClient<org.apache.http.HttpResponse>
      • setTimeout

        public HttpClient<org.apache.http.HttpResponse> setTimeout​(int timeoutMs)
        Specified by:
        setTimeout in interface HttpClient<org.apache.http.HttpResponse>
      • setRetryCount

        public HttpClient<org.apache.http.HttpResponse> setRetryCount​(int count)
        Specified by:
        setRetryCount in interface HttpClient<org.apache.http.HttpResponse>
      • addHeader

        public HttpClient<org.apache.http.HttpResponse> addHeader​(java.lang.String name,
                                                                  java.lang.String value)
        Specified by:
        addHeader in interface HttpClient<org.apache.http.HttpResponse>
      • addPayload

        public HttpClient<org.apache.http.HttpResponse> addPayload​(java.lang.String contentType,
                                                                   java.lang.String payload)
        Specified by:
        addPayload in interface HttpClient<org.apache.http.HttpResponse>
      • execute

        public void execute​(RequestProcessor<org.apache.http.HttpResponse> processor)
                     throws java.lang.Exception
        Specified by:
        execute in interface HttpClient<org.apache.http.HttpResponse>
        Throws:
        java.lang.Exception