The Request Langs extracted from the Accept-Language header and sorted by preference (preferred first).
The Request Langs extracted from the Accept-Language header and sorted by preference (preferred first).
The media types list of the request’s Accept header, sorted by preference (preferred first).
Check if this request accepts a given media type.
Check if this request accepts a given media type.
true if mimeType
matches the Accept header, otherwise false
Create a new versions of this object with the given attribute attached to it.
Create a new versions of this object with the given attribute attached to it.
The new attribute key.
The attribute value.
The new version of this object with the new attribute.
A map of typed attributes associated with the request.
A map of typed attributes associated with the request.
The body content.
The body content.
Returns the charset of the request for text-based body
Returns the charset of the request for text-based body
The X509 certificate chain presented by a client during SSL requests.
The X509 certificate chain presented by a client during SSL requests. This method is
equivalent to connection.clientCertificateChain
.
The remote connection that made the request.
The remote connection that made the request.
Returns the value of the Content-Type header (without the parameters (eg charset))
Returns the value of the Content-Type header (without the parameters (eg charset))
The HTTP cookies.
The HTTP cookies. The request's cookies are stored in an attribute indexed by play.api.mvc.request.RequestAttrKey.Cookies. The attribute uses a Cell to store the cookies, to allow them to be evaluated on-demand.
The HTTP domain.
The HTTP domain. The domain part of the request's host.
Parses the Flash
cookie and returns the Flash
data.
Parses the Flash
cookie and returns the Flash
data. The request's flash cookie is stored in an attribute indexed by
play.api.mvc.request.RequestAttrKey.Flash. The attribute uses a play.api.mvc.request.Cell to store the session, to allow it to be evaluated on-demand.
Helper method to access a queryString parameter.
Helper method to access a queryString parameter. This method delegates to connection.getQueryParameter(key)
.
The query parameter's value if the parameter is present
and there is only one value. If the parameter is absent
or there is more than one value for that parameter then
None
is returned.
True if this request has a body.
True if this request has a body. This is either done by inspecting the body itself to see if it is an entity representing an "empty" body.
The HTTP headers.
The HTTP headers.
The HTTP host (domain, optionally port).
The HTTP host (domain, optionally port). This value is derived from the request target, if a hostname is present.
If the target doesn't have a host then the Host
header is used, if present. If that's not present then an
empty string is returned.
The request id.
The request id. The request id is stored as an attribute indexed by play.api.mvc.request.RequestAttrKey.Id.
Transform the request body.
Transform the request body.
The media type of this request.
The media type of this request. Same as contentType, except returns a fully parsed media type with parameters.
The HTTP method.
The HTTP method.
Create a copy of this wrapper, but wrapping a new request.
Create a copy of this wrapper, but wrapping a new request. Subclasses can override this method.
The URI path.
The URI path. This method delegates to target.path
.
The parsed query string.
The parsed query string. This method delegates to target.queryMap
.
Returns the raw query string.
Returns the raw query string. This method delegates to connection.rawQueryString
.
The client IP address.
The client IP address.
retrieves the last untrusted proxy from the Forwarded-Headers or the X-Forwarded-*-Headers.
This method delegates to connection.remoteAddressString
.
Is the client using SSL? This method delegates to connection.secure
.
Is the client using SSL? This method delegates to connection.secure
.
Parses the Session
cookie and returns the Session
data.
Parses the Session
cookie and returns the Session
data. The request's session cookie is stored in an attribute indexed by
play.api.mvc.request.RequestAttrKey.Session. The attribute uses a Cell to store the session cookie, to allow it to be evaluated on-demand.
The target of the HTTP request, i.e.
The target of the HTTP request, i.e. the URI or path that was given on the first line of the request.
The complete request URI, containing both path and query string.
The complete request URI, containing both path and query string. The URI is what was on the status line after the request method. E.g. in "GET /foo/bar?q=s HTTP/1.1" the URI should be /foo/bar?q=s. It could be absolute, some clients send absolute URLs, especially proxies, e.g. http://www.example.org/foo/bar?q=s.
This method delegates to target.uriString
.
The HTTP version.
The HTTP version.
Create a new version of this object with the given attributes attached to it.
Create a new version of this object with the given attributes attached to it. This replaces any existing attributes.
The new attributes to add.
The new version of this object with the attributes attached.
Attach a body to this header.
Attach a body to this header.
The body to attach.
A new request with the body attached to the header.
The remote connection that made the request.
The remote connection that made the request.
Return a new copy of the request with its method changed.
Return a new copy of the request with its method changed.
Convenience method for adding a single tag to this request
Convenience method for adding a single tag to this request
the tagged request
Return a new copy of the request with its target changed.
Return a new copy of the request with its target changed.
Return a new copy of the request with its HTTP version changed.
Return a new copy of the request with its HTTP version changed.
Copy the request.
Copy the request.
(Since version 2.6.0) Use the with* methods instead
The request Tags.
The request Tags. The request's tags are stored in an optional attribute indexed by play.api.mvc.request.RequestAttrKey.Tags. If the attribute is not present then the tags are assumed to be empty.
(Since version 2.6.0) Use typed attributes instead, see attrs
Wrap an existing request. Useful to extend a request.
If you need to add extra values to a request, you could consider using request attributes instead. See the
attr
,withAttr
, etc methods.