org.apache.http.message
Class BasicHttpRequest

java.lang.Object
  extended by org.apache.http.message.AbstractHttpMessage
      extended by org.apache.http.message.BasicHttpRequest
All Implemented Interfaces:
HttpMessage, HttpRequest
Direct Known Subclasses:
BasicHttpEntityEnclosingRequest

@NotThreadSafe
public class BasicHttpRequest
extends AbstractHttpMessage
implements HttpRequest

Basic implementation of HttpRequest.

Since:
4.0

Field Summary
 
Fields inherited from class org.apache.http.message.AbstractHttpMessage
headergroup, params
 
Constructor Summary
BasicHttpRequest(RequestLine requestline)
          Creates an instance of this class using the given request line.
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.
 
Method Summary
 ProtocolVersion getProtocolVersion()
          Returns the HTTP protocol version to be used for this request.
 RequestLine getRequestLine()
          Returns the request line of this request.
 String toString()
           
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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

BasicHttpRequest

public BasicHttpRequest(String method,
                        String uri)
Creates an instance of this class using the given request method and URI.

Parameters:
method - request method.
uri - request URI.

BasicHttpRequest

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.

BasicHttpRequest

public BasicHttpRequest(RequestLine requestline)
Creates an instance of this class using the given request line.

Parameters:
requestline - request line.
Method Detail

getProtocolVersion

public ProtocolVersion getProtocolVersion()
Returns the HTTP protocol version to be used for this request.

Specified by:
getProtocolVersion in interface HttpMessage
See Also:
BasicHttpRequest(String, String)

getRequestLine

public RequestLine getRequestLine()
Returns the request line of this request.

Specified by:
getRequestLine in interface HttpRequest
Returns:
the request line.
See Also:
BasicHttpRequest(String, String)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.