public class Request extends Object implements MangooValidator
| Constructor and Description |
|---|
Request() |
Request(io.undertow.server.HttpServerExchange httpServerExchange,
Session session,
String authenticityToken,
Authentication authentication,
Map<String,String> parameter,
String body) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
authenticityMatches()
Checks if the session bound authenticity token matches the client sent
authenticity token
|
String |
getAcceptLanguage()
Retrieves a the clients accepted languages
|
Authentication |
getAuthentication() |
String |
getBody() |
Map<String,Object> |
getBodyAsJsonMap() |
com.jayway.jsonpath.ReadContext |
getBodyAsJsonPath() |
String |
getCharset()
Returns the request charset.
|
long |
getContentLength() |
io.undertow.server.handlers.Cookie |
getCookie(String name)
Retrieves a single cookie from the request
|
Map<String,io.undertow.server.handlers.Cookie> |
getCookies() |
String |
getError(String name)
Returns the errors message of specific field
|
String |
getHeader(io.undertow.util.HttpString headerName)
Retrieves a specific header value by its name
|
io.undertow.util.HeaderMap |
getHeaders()
Retrieves a list of all headers send by the client
|
Optional<JsonWebToken> |
getJsonWebToken() |
io.undertow.util.HttpString |
getMethod()
Get the HTTP request method.
|
Map<String,String> |
getParameter()
Retrieves a map of request parameter (request or query parameter)
|
String |
getParameter(String key)
Retrieves a request parameter (request or query parameter) by its name
|
String |
getPath()
The request path.
|
String |
getScheme()
Get the request URI scheme.
|
Session |
getSession() |
String |
getURI()
The original request URI.
|
String |
getURL()
Reconstructs the complete URL as seen by the user.
|
void |
setJsonWebToken(JsonWebToken jsonWebToken)
Set a Json Web Token to the request
|
Validator |
validation()
Returns the validator object for validation methods
|
public Session getSession()
public String getBody()
public Map<String,Object> getBodyAsJsonMap()
public com.jayway.jsonpath.ReadContext getBodyAsJsonPath()
public boolean authenticityMatches()
public Authentication getAuthentication()
public String getParameter(String key)
key - The key to lookup the parameterpublic Map<String,String> getParameter()
public io.undertow.util.HeaderMap getHeaders()
public String getAcceptLanguage()
public String getHeader(io.undertow.util.HttpString headerName)
headerName - The name of the header to retrievepublic String getURI()
public String getURL()
public Map<String,io.undertow.server.handlers.Cookie> getCookies()
public io.undertow.server.handlers.Cookie getCookie(String name)
name - The name of the cookiepublic String getScheme()
http or https.public String getCharset()
public long getContentLength()
-1 if it has not been setpublic io.undertow.util.HttpString getMethod()
Methods.public String getPath()
public void setJsonWebToken(JsonWebToken jsonWebToken)
jsonWebToken - The Json Web Tokenpublic Optional<JsonWebToken> getJsonWebToken()
public Validator validation()
MangooValidatorvalidation in interface MangooValidatorpublic String getError(String name)
MangooValidatorgetError in interface MangooValidatorname - The field to checkCopyright © 2016. All rights reserved.