|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnetapp.manage.http.HTTPMessage
netapp.manage.http.HTTPRequest
This class represents a HTTP request.
| Field Summary |
| Fields inherited from class netapp.manage.http.HTTPMessage |
_contents, _header, _headerLowerCase, _version, METHOD_GET, METHOD_POST, VERSION_1_0, VERSION_1_1 |
| Constructor Summary | |
HTTPRequest(int method,
java.lang.String path,
int version)
Constructs a HTTPRequest. |
|
| Method Summary | |
protected java.lang.String |
firstLine()
Get the first line of this HTTP request. |
int |
getMethod()
Get the HTTP method of this request. |
java.lang.String |
getPath()
Get the URI-path for this HTTP request. |
static HTTPRequest |
read(java.io.InputStream in)
Create a new HTTP request by reading data from a socket. |
void |
setBasicAuthorization(java.lang.String username,
java.lang.String password)
Add a header for HTTP Basic authentication. |
| Methods inherited from class netapp.manage.http.HTTPMessage |
getContents, getHeader, headersString, methodFromString, methodToString, processHeaderLine, readContents, readLine, removeHeader, setContents, setHeader, toString, versionFromString, versionToString, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public HTTPRequest(int method,
java.lang.String path,
int version)
HTTPRequest.
method - the HTTP request method.path - the URI path to request.version - the HTTP version.| Method Detail |
public int getMethod()
HTTPMessage.METHOD_GET or
HTTPMessage.METHOD_POST.
public java.lang.String getPath()
public void setBasicAuthorization(java.lang.String username,
java.lang.String password)
username - the username.password - the password.
public static HTTPRequest read(java.io.InputStream in)
throws java.io.IOException,
HTTPException
in - an InputStream, presumably
connected to a server socket.
HTTPRequest.
java.io.IOException - if there is a communication error on
the InputStream.
HTTPException - if the HTTP request is malformed.protected java.lang.String firstLine()
firstLine in class HTTPMessage
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||