public static class Http.Request extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
String |
action
Full action (ex: Application.index)
|
String |
actionMethod
Action method name
|
Map<String,Object> |
args
Free space to store your request specific data
|
InputStream |
body
Body stream
|
String |
contentType
Request content-type
|
String |
controller
Controller to invoke
|
Class<? extends Controller> |
controllerClass
The invoked controller class
|
Controller |
controllerInstance
The instance of invoked controller in case it uses non-static action methods.
|
Map<String,Http.Cookie> |
cookies
HTTP Cookies
|
static ThreadLocal<Http.Request> |
current
Bind to thread
|
Date |
date
When the request has been received
|
String |
domain
Server domain
|
String |
encoding
This is the encoding used to decode this request.
|
String |
format
Format (html,xml,json,text)
|
Map<String,Http.Header> |
headers
HTTP Headers
|
String |
host
Server host
|
Method |
invokedMethod
The really invoker Java method
|
boolean |
isLoopback
Request comes from loopback interface
|
boolean |
isNew
New request or already submitted
|
String |
method
HTTP method
|
Scope.Params |
params
Params
|
String |
password
HTTP Basic Password
|
String |
path
Request path
|
Integer |
port
HTTP port
|
String |
querystring
QueryString
|
String |
remoteAddress
Client address
|
Map<String,String> |
routeArgs
Additional HTTP params extracted from route
|
Boolean |
secure
is HTTPS ?
|
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 |
String |
user
HTTP Basic User
|
Constructor and Description |
---|
Request()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
_init()
Deprecated.
|
List<String> |
acceptLanguage()
Return the languages requested by the browser, ordered by preference
(preferred first).
|
protected void |
authorizationInit() |
static Http.Request |
createRequest(String _remoteAddress,
String _method,
String _path,
String _querystring,
String _contentType,
InputStream _body,
String _url,
String _host,
boolean _isLoopback,
int _port,
String _domain,
boolean _secure,
Map<String,Http.Header> _headers,
Map<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
|
String |
getBase()
Get the request base (ex: http://localhost:9000
|
boolean |
isAjax()
This request was sent by an Ajax framework.
|
boolean |
isModified(String etag,
long last) |
protected void |
parseXForwarded() |
void |
resolveFormat()
Automatically resolve request format from the Accept header (in this
order : html > xml > json > text)
|
String |
toString() |
public String host
public String path
public String querystring
public String url
http://localhost:9000/path0/path1
/path0/path1
public String method
public String domain
public String remoteAddress
public String contentType
public String encoding
public String controller
public String actionMethod
public Integer port
public Boolean secure
public Map<String,Http.Header> headers
public Map<String,Http.Cookie> cookies
public transient InputStream body
public String format
public String action
public static final ThreadLocal<Http.Request> current
public transient Method invokedMethod
public transient Class<? extends Controller> controllerClass
public transient Controller controllerInstance
public Date date
public boolean isNew
public String user
public String password
public boolean isLoopback
public final Scope.Params params
@Deprecated public Request()
public static Http.Request createRequest(String _remoteAddress, String _method, String _path, String _querystring, String _contentType, InputStream _body, String _url, String _host, boolean _isLoopback, int _port, String _domain, boolean _secure, Map<String,Http.Header> _headers, Map<String,Http.Cookie> _cookies)
protected 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 String getBase()
public List<String> acceptLanguage()
public boolean isModified(String etag, long last)
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly