Class HttpRequestWrapper

    • Method Detail

      • setProtocolVersion

        public void setProtocolVersion​(ProtocolVersion version)
      • getURI

        public java.net.URI getURI()
        Description copied from interface: HttpUriRequest
        Returns the URI this request uses, such as http://example.org/path/to/file.

        Note that the URI may be absolute URI (as above) or may be a relative URI.

        Implementations are encouraged to return the URI that was initially requested.

        To find the final URI after any redirects have been processed, please see the section entitled HTTP execution context in the HttpClient Tutorial

        Specified by:
        getURI in interface HttpUriRequest
      • setURI

        public void setURI​(java.net.URI uri)
      • getMethod

        public java.lang.String getMethod()
        Description copied from interface: HttpUriRequest
        Returns the HTTP method this request uses, such as GET, PUT, POST, or other.
        Specified by:
        getMethod in interface HttpUriRequest
      • abort

        public void abort()
                   throws java.lang.UnsupportedOperationException
        Description copied from interface: HttpUriRequest
        Aborts execution of the request.
        Specified by:
        abort in interface HttpUriRequest
        Throws:
        java.lang.UnsupportedOperationException - if the abort operation is not supported / cannot be implemented.
      • isAborted

        public boolean isAborted()
        Description copied from interface: HttpUriRequest
        Tests if the request execution has been aborted.
        Specified by:
        isAborted in interface HttpUriRequest
        Returns:
        true if the request execution has been aborted, false otherwise.
      • getTarget

        public HttpHost getTarget()
        Since:
        4.4
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • wrap

        public static HttpRequestWrapper wrap​(HttpRequest request)
        Creates a mutable wrapper of the original request.
        Parameters:
        request - original request
        Returns:
        mutable request wrappering the original one
      • wrap

        public static HttpRequestWrapper wrap​(HttpRequest request,
                                              HttpHost target)
        Creates a mutable wrapper of the original request.
        Parameters:
        request - original request
        target - original target, if explicitly specified
        Returns:
        mutable request wrappering the original one
        Since:
        4.4