|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.webbitserver.wrapper.HttpRequestWrapper
public class HttpRequestWrapper
| Field Summary |
|---|
| Fields inherited from interface org.webbitserver.HttpRequest |
|---|
COOKIE_HEADER |
| Constructor Summary | |
|---|---|
HttpRequestWrapper(HttpRequest request)
|
|
| 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 |
Map<String,Object> |
data()
Arbitrary data that can be stored for the lifetime of the connection. |
Object |
data(String key)
Retrieve data value by key. |
HttpRequestWrapper |
data(String key,
Object value)
Store data value by key. |
Set<String> |
dataKeys()
List data keys. |
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. |
HttpRequest |
originalRequest()
|
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. |
HttpRequest |
underlyingRequest()
|
HttpRequestWrapper |
underlyingRequest(HttpRequest request)
|
String |
uri()
|
HttpRequestWrapper |
uri(String uri)
Modify uri |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpRequestWrapper(HttpRequest request)
| Method Detail |
|---|
public HttpRequest underlyingRequest()
public HttpRequestWrapper underlyingRequest(HttpRequest request)
public HttpRequest originalRequest()
public String uri()
uri in interface HttpRequestpublic HttpRequestWrapper uri(String uri)
HttpRequest
uri in interface HttpRequesturi - new uripublic String header(String name)
HttpRequestHttpRequest.headers(String).
header in interface HttpRequestpublic boolean hasHeader(String name)
HttpRequest
hasHeader in interface HttpRequestpublic List<HttpCookie> cookies()
cookies in interface HttpRequestpublic HttpCookie cookie(String name)
HttpRequest
cookie in interface HttpRequestname - cookie name
public String queryParam(String key)
HttpRequest
queryParam in interface HttpRequestkey - parameter name
HttpRequest.queryParams(String)public List<String> queryParams(String key)
HttpRequest
queryParams in interface HttpRequestkey - parameter name
HttpRequest.queryParam(String)public Set<String> queryParamKeys()
HttpRequest
queryParamKeys in interface HttpRequestHttpRequest.queryParam(String)public String postParam(String key)
HttpRequest
postParam in interface HttpRequestkey - parameter name
HttpRequest.postParams(String)public List<String> postParams(String key)
HttpRequest
postParams in interface HttpRequestkey - parameter name
HttpRequest.postParam(String)public Set<String> postParamKeys()
HttpRequest
postParamKeys in interface HttpRequestHttpRequest.postParam(String)public String cookieValue(String name)
HttpRequest
cookieValue in interface HttpRequestname - cookie name
public List<String> headers(String name)
HttpRequest
headers in interface HttpRequestpublic List<Map.Entry<String,String>> allHeaders()
HttpRequest
allHeaders in interface HttpRequestpublic String method()
HttpRequest
method in interface HttpRequestpublic String body()
HttpRequest
body in interface HttpRequestpublic byte[] bodyAsBytes()
HttpRequest
bodyAsBytes in interface HttpRequestpublic Map<String,Object> data()
DataHolder
data in interface DataHolderpublic Object data(String key)
DataHolder
data in interface DataHolderDataHolder.data()
public HttpRequestWrapper data(String key,
Object value)
DataHolder
data in interface DataHolderdata in interface HttpRequestDataHolder.data()public Set<String> dataKeys()
DataHolder
dataKeys in interface DataHolderDataHolder.data()public SocketAddress remoteAddress()
HttpRequest
remoteAddress in interface HttpRequestpublic Object id()
HttpRequest
id in interface HttpRequestpublic long timestamp()
HttpRequest
timestamp in interface HttpRequest
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||