Class HttpRequestBase

java.lang.Object
org.apache.http.message.AbstractHttpMessage
org.apache.http.client.methods.AbstractExecutionAwareRequest
org.apache.http.client.methods.HttpRequestBase
All Implemented Interfaces:
Cloneable, AbortableHttpRequest, Configurable, HttpExecutionAware, HttpUriRequest, org.apache.http.HttpMessage, org.apache.http.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(org.apache.http.ProtocolVersion version)
      Since:
      4.3
    • getProtocolVersion

      public org.apache.http.ProtocolVersion getProtocolVersion()
      Specified by:
      getProtocolVersion in interface org.apache.http.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 org.apache.http.RequestLine getRequestLine()
      Specified by:
      getRequestLine in interface org.apache.http.HttpRequest
    • 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