@Deprecated public class RequestWrapper extends org.apache.http.message.AbstractHttpMessage implements HttpUriRequest
HttpRequests 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.
| Constructor and Description |
|---|
RequestWrapper(org.apache.http.HttpRequest request)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Deprecated.
Aborts execution of the request.
|
int |
getExecCount()
Deprecated.
|
String |
getMethod()
Deprecated.
Returns the HTTP method this request uses, such as
GET,
PUT, POST, or other. |
org.apache.http.HttpRequest |
getOriginal()
Deprecated.
|
org.apache.http.ProtocolVersion |
getProtocolVersion()
Deprecated.
|
org.apache.http.RequestLine |
getRequestLine()
Deprecated.
|
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(String method)
Deprecated.
|
void |
setProtocolVersion(org.apache.http.ProtocolVersion version)
Deprecated.
|
void |
setURI(URI uri)
Deprecated.
|
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParamspublic RequestWrapper(org.apache.http.HttpRequest request)
throws org.apache.http.ProtocolException
org.apache.http.ProtocolExceptionpublic void resetHeaders()
public String getMethod()
HttpUriRequestGET,
PUT, POST, or other.getMethod in interface HttpUriRequestpublic void setMethod(String method)
public org.apache.http.ProtocolVersion getProtocolVersion()
getProtocolVersion in interface org.apache.http.HttpMessagepublic void setProtocolVersion(org.apache.http.ProtocolVersion version)
public URI getURI()
HttpUriRequesthttp://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 HttpUriRequestpublic void setURI(URI uri)
public org.apache.http.RequestLine getRequestLine()
getRequestLine in interface org.apache.http.HttpRequestpublic void abort()
throws UnsupportedOperationException
HttpUriRequestabort in interface HttpUriRequestUnsupportedOperationException - if the abort operation
is not supported / cannot be implemented.public boolean isAborted()
HttpUriRequestisAborted in interface HttpUriRequesttrue if the request execution has been aborted,
false otherwise.public org.apache.http.HttpRequest getOriginal()
public boolean isRepeatable()
public int getExecCount()
public void incrementExecCount()
Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.