public static class Http.Request
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
java.lang.String |
action
Full action (ex: Application.index)
|
java.lang.String |
actionMethod
Action method name
|
java.util.Map<java.lang.String,java.lang.Object> |
args
Free space to store your request specific data
|
java.io.InputStream |
body
Body stream
|
java.lang.String |
contentType
Request content-type
|
java.lang.String |
controller
Controller to invoke
|
java.lang.Class<? extends PlayController> |
controllerClass
The invoked controller class
|
PlayController |
controllerInstance
The instance of invoked controller in case it uses non-static action methods.
|
java.util.Map<java.lang.String,Http.Cookie> |
cookies
HTTP Cookies
|
static java.lang.ThreadLocal<Http.Request> |
current
Bind to thread
|
java.util.Date |
date
When the request has been received
|
java.lang.String |
domain
Server domain
|
java.lang.String |
encoding
This is the encoding used to decode this request.
|
java.lang.String |
format
Format (html,xml,json,text)
|
java.util.Map<java.lang.String,Http.Header> |
headers
HTTP Headers
|
java.lang.String |
host
Server host
|
java.lang.reflect.Method |
invokedMethod
The really invoker Java method
|
boolean |
isLoopback
Request comes from loopback interface
|
boolean |
isNew
New request or already submitted
|
java.lang.String |
method
HTTP method
|
Scope.Params |
params
Params
|
java.lang.String |
password
HTTP Basic Password
|
java.lang.String |
path
Request path
|
java.lang.Integer |
port
HTTP port
|
java.lang.String |
querystring
QueryString
|
java.lang.String |
remoteAddress
Client address
|
java.util.Map<java.lang.String,java.lang.String> |
routeArgs
Additional HTTP params extracted from route
|
java.lang.Boolean |
secure
is HTTPS ?
|
java.lang.String |
url
URL path (excluding scheme, host and port), starting with '/'
Example: With this full URL http://localhost:9000/path0/path1 => url will be /path0/path1 |
java.lang.String |
user
HTTP Basic User
|
Constructor and Description |
---|
Request()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
_init()
Deprecated.
|
java.util.List<java.lang.String> |
acceptLanguage()
Return the languages requested by the browser, ordered by preference (preferred first).
|
protected void |
authorizationInit() |
static Http.Request |
createRequest(java.lang.String _remoteAddress,
java.lang.String _method,
java.lang.String _path,
java.lang.String _querystring,
java.lang.String _contentType,
java.io.InputStream _body,
java.lang.String _url,
java.lang.String _host,
boolean _isLoopback,
int _port,
java.lang.String _domain,
boolean _secure,
java.util.Map<java.lang.String,Http.Header> _headers,
java.util.Map<java.lang.String,Http.Cookie> _cookies)
All creation / initiating of new requests should use this method.
|
static Http.Request |
current()
Retrieve the current request
|
Http.Request |
get()
Useful because we sometime use a lazy request loader
|
java.lang.String |
getBase()
Get the request base (ex: http://localhost:9000
|
boolean |
isAjax()
This request was sent by an Ajax framework.
|
boolean |
isModified(java.lang.String etag,
long last) |
protected void |
parseXForwarded() |
void |
resolveFormat()
Automatically resolve request format from the Accept header (in this order : html > xml > json >
text)
|
java.lang.String |
toString() |
public java.lang.String host
public java.lang.String path
public java.lang.String querystring
public java.lang.String url
http://localhost:9000/path0/path1
/path0/path1
public java.lang.String method
public java.lang.String domain
public java.lang.String remoteAddress
public java.lang.String contentType
public java.lang.String encoding
public java.lang.String controller
public java.lang.String actionMethod
public java.lang.Integer port
public java.lang.Boolean secure
public java.util.Map<java.lang.String,Http.Header> headers
public java.util.Map<java.lang.String,Http.Cookie> cookies
public transient java.io.InputStream body
public java.util.Map<java.lang.String,java.lang.String> routeArgs
public java.lang.String format
public java.lang.String action
public static final java.lang.ThreadLocal<Http.Request> current
public transient java.lang.reflect.Method invokedMethod
public transient java.lang.Class<? extends PlayController> controllerClass
public transient PlayController controllerInstance
public java.util.Map<java.lang.String,java.lang.Object> args
public java.util.Date date
public boolean isNew
public java.lang.String user
public java.lang.String password
public boolean isLoopback
public final Scope.Params params
@Deprecated public Request()
public static Http.Request createRequest(java.lang.String _remoteAddress, java.lang.String _method, java.lang.String _path, java.lang.String _querystring, java.lang.String _contentType, java.io.InputStream _body, java.lang.String _url, java.lang.String _host, boolean _isLoopback, int _port, java.lang.String _domain, boolean _secure, java.util.Map<java.lang.String,Http.Header> _headers, java.util.Map<java.lang.String,Http.Cookie> _cookies)
_remoteAddress
- The remote IP address_method
- the Method_path
- path_querystring
- The query String_contentType
- The content Type_body
- The request body_url
- The request URL_host
- The request host_isLoopback
- Indicate if the request comes from loopback interface_port
- The request port_domain
- The request domain_secure
- Indicate is request is secure or not_headers
- The request headers_cookies
- The request cookiesprotected void parseXForwarded()
@Deprecated public void _init()
protected void authorizationInit()
public void resolveFormat()
public static Http.Request current()
public Http.Request get()
public boolean isAjax()
public java.lang.String getBase()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<java.lang.String> acceptLanguage()
public boolean isModified(java.lang.String etag, long last)
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly