Package org.cybergarage.http
Class HTTPRequest
java.lang.Object
org.cybergarage.http.HTTPPacket
org.cybergarage.http.HTTPRequest
- Direct Known Subclasses:
SOAPRequest
,SSDPRequest
,SubscriptionRequest
This class rappresnet an HTTP request, and act as HTTP client when it sends the request
- Version:
- 1.8
- Author:
- Satoshi "skonno" Konno, Stefano "Kismet" Lenzi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getParameterValue
(String name) int
getURI()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
parseRequestLine
(String lineStr) boolean
post
(HTTPResponse httpRes) void
print()
boolean
read()
boolean
boolean
returnOK()
boolean
returnResponse
(int statusCode) void
set
(HTTPRequest httpReq) void
setBindHost
(String host) I2P - bind HTTP socket to specified local host addressvoid
void
setRequestHost
(String host) void
setRequestPort
(int host) void
setSocket
(HTTPSocket value) void
void
toString()
Methods inherited from class org.cybergarage.http.HTTPPacket
addHeader, addHeader, clearHeaders, getCacheControl, getCharSet, getConnection, getContent, getContentInputStream, getContentLanguage, getContentLength, getContentRange, getContentRangeFirstPosition, getContentRangeInstanceLength, getContentRangeLastPosition, getContentString, getContentType, getDate, getFirstLine, getFirstLineToken, getHeader, getHeader, getHeaderString, getHeaderValue, getHost, getIntegerHeaderValue, getLongHeaderValue, getNHeaders, getServer, getStringHeaderValue, getStringHeaderValue, getTransferEncoding, getVersion, hasConnection, hasContent, hasContentInputStream, hasContentRange, hasFirstLine, hasHeader, hasTransferEncoding, init, isChunked, isCloseConnection, isKeepAliveConnection, read, set, set, set, set, setCacheControl, setCacheControl, setCacheControl, setConnection, setContent, setContent, setContent, setContent, setContentInputStream, setContentLanguage, setContentLength, setContentRange, setContentType, setDate, setHeader, setHeader, setHeader, setHeader, setHost, setHost, setIntegerHeader, setLongHeader, setServer, setStringHeader, setStringHeader, setTransferEncoding, setVersion
-
Constructor Details
-
HTTPRequest
public HTTPRequest() -
HTTPRequest
-
HTTPRequest
-
-
Method Details
-
setMethod
-
getMethod
-
isMethod
-
isGetRequest
public boolean isGetRequest() -
isPostRequest
public boolean isPostRequest() -
isHeadRequest
public boolean isHeadRequest() -
isSubscribeRequest
public boolean isSubscribeRequest() -
isUnsubscribeRequest
public boolean isUnsubscribeRequest() -
isNotifyRequest
public boolean isNotifyRequest() -
setURI
-
setURI
-
getURI
-
getParameterList
-
getParameterValue
-
isSOAPAction
public boolean isSOAPAction() -
setRequestHost
-
getRequestHost
-
setRequestPort
public void setRequestPort(int host) -
getRequestPort
public int getRequestPort() -
setSocket
-
getSocket
-
getLocalAddress
-
getLocalPort
public int getLocalPort() -
parseRequestLine
-
getHTTPVersion
-
getFirstLineString
-
getHeader
-
isKeepAlive
public boolean isKeepAlive() -
read
public boolean read() -
post
-
setBindHost
I2P - bind HTTP socket to specified local host address- Parameters:
host
- null to not bind to a particlar local address- Since:
- 0.9.50
-
post
-
post
-
set
-
returnResponse
public boolean returnResponse(int statusCode) -
returnOK
public boolean returnOK() -
returnBadRequest
public boolean returnBadRequest() -
toString
-
print
public void print()
-