Android APIs
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.client.methods.HttpUriRequest
From interface org.apache.http.HttpRequest

Public Constructors

public RequestWrapper (HttpRequest request)

Added in API level 1

Public Methods

public void abort ()

Added in API level 1

Aborts execution of the request.

public int getExecCount ()

Added in API level 1

public String getMethod ()

Added in API level 1

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

public HttpRequest getOriginal ()

Added in API level 1

public ProtocolVersion getProtocolVersion ()

Added in API level 1

Returns the protocol version this message is compatible with.

public RequestLine getRequestLine ()

Added in API level 1

Returns the request line of this request.

Returns
  • the request line.

public URI getURI ()

Added in API level 1

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

public void incrementExecCount ()

Added in API level 1

public boolean isAborted ()

Added in API level 1

Tests if the request execution has been aborted.

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

public boolean isRepeatable ()

Added in API level 1

public void resetHeaders ()

Added in API level 1

public void setMethod (String method)

Added in API level 1

public void setProtocolVersion (ProtocolVersion version)

Added in API level 1

public void setURI (URI uri)

Added in API level 1