public class

RequestWrapper

extends AbstractHttpMessage
implements HttpUriRequest
java.lang.Object
   ↳ org.apache.http.message.AbstractHttpMessage
     ↳ org.apache.http.impl.client.RequestWrapper
Known Direct Subclasses

Class Overview

A wrapper class for 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.

Summary

[Expand]
Inherited Fields
From class org.apache.http.message.AbstractHttpMessage
Public Constructors
RequestWrapper(HttpRequest request)
Public Methods
void abort()
Aborts execution of the request.
int getExecCount()
String getMethod()
Returns the HTTP method this request uses, such as GET, PUT, POST, or other.
HttpRequest getOriginal()
ProtocolVersion getProtocolVersion()
Returns the protocol version this message is compatible with.
RequestLine getRequestLine()
Returns the request line of this request.
URI getURI()
Returns the URI this request uses, such as http://example.org/path/to/file.
void incrementExecCount()
boolean isAborted()
Tests if the request execution has been aborted.
boolean isRepeatable()
void resetHeaders()
void setMethod(String method)
void setProtocolVersion(ProtocolVersion version)
void setURI(URI uri)
[Expand]
Inherited Methods
From class org.apache.http.message.AbstractHttpMessage
From class java.lang.Object
From interface org.apache.http.HttpMessage
From interface org.apache.http.HttpRequest
From interface org.apache.http.client.methods.HttpUriRequest

Public Constructors

public RequestWrapper (HttpRequest request)

Public Methods

public void abort ()

Aborts execution of the request.

public int getExecCount ()

public String getMethod ()

Returns the HTTP method this request uses, such as GET, PUT, POST, or other.

public HttpRequest getOriginal ()

public ProtocolVersion getProtocolVersion ()

Returns the protocol version this message is compatible with.

public RequestLine getRequestLine ()

Returns the request line of this request.

Returns
  • the request line.

public URI getURI ()

Returns the URI this request uses, such as http://example.org/path/to/file.

public void incrementExecCount ()

public boolean isAborted ()

Tests if the request execution has been aborted.

Returns
  • true if the request execution has been aborted, false otherwise.

public boolean isRepeatable ()

public void resetHeaders ()

public void setMethod (String method)

public void setProtocolVersion (ProtocolVersion version)

public void setURI (URI uri)