Package com.netscape.cmsutil.http
Class HttpRequest
- java.lang.Object
-
- com.netscape.cmsutil.http.HttpMessage
-
- com.netscape.cmsutil.http.HttpRequest
-
public class HttpRequest extends HttpMessage
Basic HTTP Request. not optimized for performance. Set fields or parse from input. Handles text content.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringGETstatic java.lang.StringHEADprotected java.lang.StringmHttpVersprotected java.lang.StringmMethodprotected java.lang.StringmURIstatic java.lang.StringPOST-
Fields inherited from class com.netscape.cmsutil.http.HttpMessage
mContent, mHeaders, mLine
-
-
Constructor Summary
Constructors Constructor Description HttpRequest()Instantiate a HttpResponse for write to http client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetHttpVers()get http versionjava.lang.StringgetMethod()get methodjava.lang.StringgetURI()get reason phrasevoidparse(java.io.BufferedReader reader)parse a http request from a http clientvoidreset()voidsetMethod(java.lang.String method)set set request method.voidsetURI(java.lang.String uri)set reason phrase.voidwrite(java.io.OutputStreamWriter writer)write request to the http client-
Methods inherited from class com.netscape.cmsutil.http.HttpMessage
getContent, getHeader, readHeaders, setContent, setHeader, writeHeaders
-
-
-
-
Field Detail
-
GET
public static final java.lang.String GET
- See Also:
- Constant Field Values
-
POST
public static final java.lang.String POST
- See Also:
- Constant Field Values
-
HEAD
public static final java.lang.String HEAD
- See Also:
- Constant Field Values
-
mMethod
protected java.lang.String mMethod
-
mURI
protected java.lang.String mURI
-
mHttpVers
protected java.lang.String mHttpVers
-
-
Method Detail
-
setMethod
public void setMethod(java.lang.String method) throws HttpProtocolExceptionset set request method.- Throws:
HttpProtocolException
-
setURI
public void setURI(java.lang.String uri)
set reason phrase.
-
write
public void write(java.io.OutputStreamWriter writer) throws java.io.IOExceptionwrite request to the http client- Overrides:
writein classHttpMessage- Throws:
java.io.IOException
-
parse
public void parse(java.io.BufferedReader reader) throws java.io.IOExceptionparse a http request from a http client- Overrides:
parsein classHttpMessage- Throws:
java.io.IOException
-
reset
public void reset()
- Overrides:
resetin classHttpMessage
-
getMethod
public java.lang.String getMethod()
get method
-
getURI
public java.lang.String getURI()
get reason phrase
-
getHttpVers
public java.lang.String getHttpVers()
get http version
-
-