Class HttpRequestBase

All Implemented Interfaces:
Cloneable, AbortableHttpRequest, Configurable, HttpExecutionAware, HttpUriRequest, HttpMessage, HttpRequest
Direct Known Subclasses:
HttpDelete, HttpEntityEnclosingRequestBase, HttpGet, HttpHead, HttpOptions, HttpTrace

public abstract class HttpRequestBase extends AbstractExecutionAwareRequest implements HttpUriRequest, Configurable
Base implementation of HttpUriRequest.
Since:
4.0
  • Constructor Details

    • HttpRequestBase

      public HttpRequestBase()
  • Method Details

    • getMethod

      public abstract 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
    • setProtocolVersion

      public void setProtocolVersion(ProtocolVersion version)
      Since:
      4.3
    • getProtocolVersion

      public ProtocolVersion getProtocolVersion()
      Description copied from interface: HttpMessage
      Returns the protocol version this message is compatible with.
      Specified by:
      getProtocolVersion in interface HttpMessage
    • getURI

      public URI getURI()
      Returns the original request URI.

      Please note URI remains unchanged in the course of request execution and is not updated if the request is redirected to another location.

      Specified by:
      getURI in interface HttpUriRequest
    • getRequestLine

      public RequestLine getRequestLine()
      Description copied from interface: HttpRequest
      Returns the request line of this request.
      Specified by:
      getRequestLine in interface HttpRequest
      Returns:
      the request line.
    • getConfig

      public RequestConfig getConfig()
      Description copied from interface: Configurable
      Returns actual request configuration.
      Specified by:
      getConfig in interface Configurable
    • setConfig

      public void setConfig(RequestConfig config)
    • setURI

      public void setURI(URI uri)
    • started

      public void started()
      Since:
      4.2
    • releaseConnection

      public void releaseConnection()
      A convenience method to simplify migration from HttpClient 3.1 API. This method is equivalent to AbstractExecutionAwareRequest.reset().
      Since:
      4.2
    • toString

      public String toString()
      Overrides:
      toString in class Object