Package org.apache.http.client.methods
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:
java.lang.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 ofHttpUriRequest
.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description HttpRequestBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description RequestConfig
getConfig()
Returns actual request configuration.abstract java.lang.String
getMethod()
Returns the HTTP method this request uses, such asGET
,PUT
,POST
, or other.ProtocolVersion
getProtocolVersion()
Returns the protocol version this message is compatible with.RequestLine
getRequestLine()
Returns the request line of this request.java.net.URI
getURI()
Returns the original request URI.void
releaseConnection()
A convenience method to simplify migration from HttpClient 3.1 API.void
setConfig(RequestConfig config)
void
setProtocolVersion(ProtocolVersion version)
void
setURI(java.net.URI uri)
void
started()
java.lang.String
toString()
-
Methods inherited from class org.apache.http.client.methods.AbstractExecutionAwareRequest
abort, clone, completed, isAborted, reset, setCancellable, setConnectionRequest, setReleaseTrigger
-
Methods inherited from class org.apache.http.message.AbstractHttpMessage
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.http.HttpMessage
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
-
Methods inherited from interface org.apache.http.client.methods.HttpUriRequest
abort, isAborted
-
-
-
-
Method Detail
-
getMethod
public abstract java.lang.String getMethod()
Description copied from interface:HttpUriRequest
Returns the HTTP method this request uses, such asGET
,PUT
,POST
, or other.- Specified by:
getMethod
in interfaceHttpUriRequest
-
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 interfaceHttpMessage
-
getURI
public java.net.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 interfaceHttpUriRequest
-
getRequestLine
public RequestLine getRequestLine()
Description copied from interface:HttpRequest
Returns the request line of this request.- Specified by:
getRequestLine
in interfaceHttpRequest
- Returns:
- the request line.
-
getConfig
public RequestConfig getConfig()
Description copied from interface:Configurable
Returns actual request configuration.- Specified by:
getConfig
in interfaceConfigurable
-
setConfig
public void setConfig(RequestConfig config)
-
setURI
public void setURI(java.net.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 toAbstractExecutionAwareRequest.reset()
.- Since:
- 4.2
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-