@NotThreadSafe @Deprecated public class RequestWrapper extends AbstractHttpMessage implements HttpUriRequest
HttpRequest
s that can be used to change
properties of the current request without modifying the original
object.
This class is also capable of resetting the request headers to the state of the original request.
headergroup, params
Constructor and Description |
---|
RequestWrapper(HttpRequest request)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
abort()
Deprecated.
Aborts execution of the request.
|
int |
getExecCount()
Deprecated.
|
java.lang.String |
getMethod()
Deprecated.
Returns the HTTP method this request uses, such as
GET ,
PUT , POST , or other. |
HttpRequest |
getOriginal()
Deprecated.
|
ProtocolVersion |
getProtocolVersion()
Deprecated.
Returns the protocol version this message is compatible with.
|
RequestLine |
getRequestLine()
Deprecated.
Returns the request line of this request.
|
java.net.URI |
getURI()
Deprecated.
Returns the URI this request uses, such as
http://example.org/path/to/file . |
void |
incrementExecCount()
Deprecated.
|
boolean |
isAborted()
Deprecated.
Tests if the request execution has been aborted.
|
boolean |
isRepeatable()
Deprecated.
|
void |
resetHeaders()
Deprecated.
|
void |
setMethod(java.lang.String method)
Deprecated.
|
void |
setProtocolVersion(ProtocolVersion version)
Deprecated.
|
void |
setURI(java.net.URI uri)
Deprecated.
|
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
public RequestWrapper(HttpRequest request) throws ProtocolException
ProtocolException
public void resetHeaders()
public java.lang.String getMethod()
HttpUriRequest
GET
,
PUT
, POST
, or other.getMethod
in interface HttpUriRequest
public void setMethod(java.lang.String method)
public ProtocolVersion getProtocolVersion()
HttpMessage
getProtocolVersion
in interface HttpMessage
public void setProtocolVersion(ProtocolVersion version)
public java.net.URI getURI()
HttpUriRequest
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
getURI
in interface HttpUriRequest
public void setURI(java.net.URI uri)
public RequestLine getRequestLine()
HttpRequest
getRequestLine
in interface HttpRequest
public void abort() throws java.lang.UnsupportedOperationException
HttpUriRequest
abort
in interface HttpUriRequest
java.lang.UnsupportedOperationException
- if the abort operation
is not supported / cannot be implemented.public boolean isAborted()
HttpUriRequest
isAborted
in interface HttpUriRequest
true
if the request execution has been aborted,
false
otherwise.public HttpRequest getOriginal()
public boolean isRepeatable()
public int getExecCount()
public void incrementExecCount()