|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HttpRequest
Retrieves information about inbound HTTP request.
HttpHandler,
HttpResponse| Field Summary | |
|---|---|
static String |
COOKIE_HEADER
|
| Method Summary | |
|---|---|
List<Map.Entry<String,String>> |
allHeaders()
Returns all headers sent from client. |
String |
body()
The body |
byte[] |
bodyAsBytes()
The body's byte array |
HttpCookie |
cookie(String name)
Get a cookie with a specific name |
List<HttpCookie> |
cookies()
|
String |
cookieValue(String name)
Get the value of named cookie |
HttpRequest |
data(String key,
Object value)
Store data value by key. |
boolean |
hasHeader(String name)
Whether a specific HTTP header was present in the request. |
String |
header(String name)
Retrieve the value single HTTP header. |
List<String> |
headers(String name)
Retrieve all values for an HTTP header. |
Object |
id()
A unique identifier for this request. |
String |
method()
HTTP method (e.g. |
String |
postParam(String key)
Get post parameter value. |
Set<String> |
postParamKeys()
List all post parameter keys. |
List<String> |
postParams(String key)
Get all post parameter values. |
String |
queryParam(String key)
Get query parameter value. |
Set<String> |
queryParamKeys()
List all query parameter keys. |
List<String> |
queryParams(String key)
Get all query parameter values. |
SocketAddress |
remoteAddress()
Remote address of connection (i.e. |
long |
timestamp()
Timestamp (millis since epoch) of when this request was first received by the server. |
String |
uri()
|
HttpRequest |
uri(String uri)
Modify uri |
| Methods inherited from interface org.webbitserver.DataHolder |
|---|
data, data, dataKeys |
| Field Detail |
|---|
static final String COOKIE_HEADER
| Method Detail |
|---|
String uri()
HttpRequest uri(String uri)
uri - new uriString header(String name)
headers(String).
List<String> headers(String name)
boolean hasHeader(String name)
List<HttpCookie> cookies()
HttpCookie cookie(String name)
name - cookie name
String queryParam(String key)
key - parameter name
queryParams(String)List<String> queryParams(String key)
key - parameter name
queryParam(String)Set<String> queryParamKeys()
queryParam(String)String postParam(String key)
key - parameter name
postParams(String)List<String> postParams(String key)
key - parameter name
postParam(String)Set<String> postParamKeys()
postParam(String)String cookieValue(String name)
name - cookie name
List<Map.Entry<String,String>> allHeaders()
String method()
String body()
byte[] bodyAsBytes()
HttpRequest data(String key,
Object value)
DataHolder
data in interface DataHolderDataHolder.data()SocketAddress remoteAddress()
Object id()
long timestamp()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||