public class

BasicHttpRequest

extends AbstractHttpMessage
implements HttpRequest
java.lang.Object
   ↳ org.apache.http.message.AbstractHttpMessage
     ↳ org.apache.http.message.BasicHttpRequest
Known Direct Subclasses

Class Overview

Basic implementation of HttpRequest.

The following parameters can be used to customize the behavior of this class:

Summary

[Expand]
Inherited Fields
From class org.apache.http.message.AbstractHttpMessage
Public Constructors
BasicHttpRequest(String method, String uri)
Creates an instance of this class using the given request method and URI.
BasicHttpRequest(String method, String uri, ProtocolVersion ver)
Creates an instance of this class using the given request method, URI and the HTTP protocol version.
BasicHttpRequest(RequestLine requestline)
Creates an instance of this class using the given request line.
Public Methods
ProtocolVersion getProtocolVersion()
Returns the HTTP protocol version to be used for this request.
RequestLine getRequestLine()
Returns the request line of this request.
String toString()
[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

Public Constructors

public BasicHttpRequest (String method, String uri)

Creates an instance of this class using the given request method and URI. The HTTP protocol version will be obtained from the HttpParams instance associated with the object. The initialization will be deferred until getRequestLine() is accessed for the first time.

Parameters
method request method.
uri request URI.

public BasicHttpRequest (String method, String uri, ProtocolVersion ver)

Creates an instance of this class using the given request method, URI and the HTTP protocol version.

Parameters
method request method.
uri request URI.
ver HTTP protocol version.

public BasicHttpRequest (RequestLine requestline)

Creates an instance of this class using the given request line.

Parameters
requestline request line.

Public Methods

public ProtocolVersion getProtocolVersion ()

Returns the HTTP protocol version to be used for this request. If an HTTP protocol version was not explicitly set at the construction time, this method will obtain it from the HttpParams instance associated with the object.

public RequestLine getRequestLine ()

Returns the request line of this request. If an HTTP protocol version was not explicitly set at the construction time, this method will obtain it from the HttpParams instance associated with the object.

Returns
  • the request line.

public String toString ()