Package org.apache.http.message
Class BasicHttpRequest
- java.lang.Object
-
- org.apache.http.message.AbstractHttpMessage
-
- org.apache.http.message.BasicHttpRequest
-
- All Implemented Interfaces:
HttpMessage
,HttpRequest
- Direct Known Subclasses:
BasicHttpEntityEnclosingRequest
public class BasicHttpRequest extends AbstractHttpMessage implements HttpRequest
Basic implementation ofHttpRequest
.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
equals, 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 interfaceHttpMessage
- See Also:
BasicHttpRequest(String, String)
-
getRequestLine
public RequestLine getRequestLine()
Returns the request line of this request.- Specified by:
getRequestLine
in interfaceHttpRequest
- Returns:
- the request line.
- See Also:
BasicHttpRequest(String, String)
-
-