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

Public Constructors

public RequestWrapper (HttpRequest request)

Since: API Level 1

Public Methods

public void abort ()

Since: API Level 1

Aborts execution of the request.

public int getExecCount ()

Since: API Level 1

public String getMethod ()

Since: API Level 1

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

public HttpRequest getOriginal ()

Since: API Level 1

public ProtocolVersion getProtocolVersion ()

Since: API Level 1

Returns the protocol version this message is compatible with.

public RequestLine getRequestLine ()

Since: API Level 1

Returns the request line of this request.

Returns
  • the request line.

public URI getURI ()

Since: API Level 1

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

public void incrementExecCount ()

Since: API Level 1

public boolean isAborted ()

Since: 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 ()

Since: API Level 1

public void resetHeaders ()

Since: API Level 1

public void setMethod (String method)

Since: API Level 1

public void setProtocolVersion (ProtocolVersion version)

Since: API Level 1

public void setURI (URI uri)

Since: API Level 1