Package org.apache.http.impl.client
Class RequestWrapper
- java.lang.Object
-
- org.apache.http.message.AbstractHttpMessage
-
- org.apache.http.impl.client.RequestWrapper
-
- All Implemented Interfaces:
HttpUriRequest,HttpMessage,HttpRequest
- Direct Known Subclasses:
EntityEnclosingRequestWrapper
@Deprecated public class RequestWrapper extends AbstractHttpMessage implements HttpUriRequest
Deprecated.(4.3) do not use.A wrapper class forHttpRequests 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.
- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description RequestWrapper(HttpRequest request)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidabort()Deprecated.Aborts execution of the request.intgetExecCount()Deprecated.java.lang.StringgetMethod()Deprecated.Returns the HTTP method this request uses, such asGET,PUT,POST, or other.HttpRequestgetOriginal()Deprecated.ProtocolVersiongetProtocolVersion()Deprecated.Returns the protocol version this message is compatible with.RequestLinegetRequestLine()Deprecated.Returns the request line of this request.java.net.URIgetURI()Deprecated.Returns the URI this request uses, such ashttp://example.org/path/to/file.voidincrementExecCount()Deprecated.booleanisAborted()Deprecated.Tests if the request execution has been aborted.booleanisRepeatable()Deprecated.voidresetHeaders()Deprecated.voidsetMethod(java.lang.String method)Deprecated.voidsetProtocolVersion(ProtocolVersion version)Deprecated.voidsetURI(java.net.URI uri)Deprecated.-
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, toString, 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
-
-
-
-
Constructor Detail
-
RequestWrapper
public RequestWrapper(HttpRequest request) throws ProtocolException
Deprecated.- Throws:
ProtocolException
-
-
Method Detail
-
resetHeaders
public void resetHeaders()
Deprecated.
-
getMethod
public java.lang.String getMethod()
Deprecated.Description copied from interface:HttpUriRequestReturns the HTTP method this request uses, such asGET,PUT,POST, or other.- Specified by:
getMethodin interfaceHttpUriRequest
-
setMethod
public void setMethod(java.lang.String method)
Deprecated.
-
getProtocolVersion
public ProtocolVersion getProtocolVersion()
Deprecated.Description copied from interface:HttpMessageReturns the protocol version this message is compatible with.- Specified by:
getProtocolVersionin interfaceHttpMessage
-
setProtocolVersion
public void setProtocolVersion(ProtocolVersion version)
Deprecated.
-
getURI
public java.net.URI getURI()
Deprecated.Description copied from interface:HttpUriRequestReturns the URI this request uses, such ashttp://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
- Specified by:
getURIin interfaceHttpUriRequest
-
setURI
public void setURI(java.net.URI uri)
Deprecated.
-
getRequestLine
public RequestLine getRequestLine()
Deprecated.Description copied from interface:HttpRequestReturns the request line of this request.- Specified by:
getRequestLinein interfaceHttpRequest- Returns:
- the request line.
-
abort
public void abort() throws java.lang.UnsupportedOperationExceptionDeprecated.Description copied from interface:HttpUriRequestAborts execution of the request.- Specified by:
abortin interfaceHttpUriRequest- Throws:
java.lang.UnsupportedOperationException- if the abort operation is not supported / cannot be implemented.
-
isAborted
public boolean isAborted()
Deprecated.Description copied from interface:HttpUriRequestTests if the request execution has been aborted.- Specified by:
isAbortedin interfaceHttpUriRequest- Returns:
trueif the request execution has been aborted,falseotherwise.
-
getOriginal
public HttpRequest getOriginal()
Deprecated.
-
isRepeatable
public boolean isRepeatable()
Deprecated.
-
getExecCount
public int getExecCount()
Deprecated.
-
incrementExecCount
public void incrementExecCount()
Deprecated.
-
-