public static interface Http.RequestHeader
| Modifier and Type | Method and Description |
|---|---|
play.api.mvc.RequestHeader |
_underlyingHeader()
Deprecated.
As of release 2.6.0. Use
asScala() |
List<play.api.http.MediaRange> |
acceptedTypes() |
List<Lang> |
acceptLanguages()
The Request Langs extracted from the Accept-Language header and sorted by preference (preferred first).
|
boolean |
accepts(String mimeType)
Check if this request accepts a given media type.
|
<A> Http.RequestHeader |
addAttr(TypedKey<A> key,
A value)
Create a new versions of this object with the given attribute attached to it.
|
play.api.mvc.RequestHeader |
asScala()
Return the Scala version of the request header.
|
TypedMap |
attrs() |
Optional<String> |
charset()
Get the charset of the request.
|
Optional<List<X509Certificate>> |
clientCertificateChain()
The X509 certificate chain presented by a client during SSL requests.
|
Optional<String> |
contentType()
Get the content type of the request.
|
Http.Cookie |
cookie(String name) |
Http.Cookies |
cookies() |
default String |
getHeader(String headerName)
Deprecated.
Deprecated as of 2.6.0. Use
header(String) ()} instead. |
Http.Headers |
getHeaders()
Retrieve all headers.
|
String |
getQueryString(String key)
Helper method to access a queryString parameter.
|
boolean |
hasBody()
Checks if the request has a body.
|
default boolean |
hasHeader(String headerName)
Checks if the request has the header.
|
default Optional<String> |
header(String headerName)
Retrieves a single header.
|
default Map<String,String[]> |
headers()
Deprecated.
Deprecated as of 2.6.0. Use
getHeaders() instead. |
String |
host()
The request host.
|
String |
method()
The HTTP Method.
|
String |
path()
The URI path.
|
Map<String,String[]> |
queryString()
The query string content.
|
String |
remoteAddress()
The client IP address.
|
boolean |
secure()
Is the client using SSL?
|
Map<String,String> |
tags()
Deprecated.
Use
attr, withAttr, etc. |
String |
uri()
The complete request URI, containing both path and query string.
|
String |
version()
The HTTP version.
|
Http.RequestHeader |
withAttrs(TypedMap newAttrs)
Create a new version of this object with the given attributes attached to it.
|
Http.Request |
withBody(Http.RequestBody body)
Attach a body to this header.
|
String uri()
String method()
String version()
String remoteAddress()
boolean secure()
TypedMap attrs()
Http.RequestHeader withAttrs(TypedMap newAttrs)
newAttrs - The new attributes to add.<A> Http.RequestHeader addAttr(TypedKey<A> key, A value)
A - the attribute typekey - The new attribute key.value - The attribute value.Http.Request withBody(Http.RequestBody body)
body - The body to attach.String host()
String path()
List<Lang> acceptLanguages()
List<play.api.http.MediaRange> acceptedTypes()
boolean accepts(String mimeType)
mimeType - the mimeType to check for support.mimeType is in the Accept header, otherwise falseMap<String,String[]> queryString()
String getQueryString(String key)
key - the query string parameter to look upkey.Http.Cookies cookies()
Http.Cookie cookie(String name)
name - Name of the cookie to retrieveHttp.Headers getHeaders()
@Deprecated default Map<String,String[]> headers()
getHeaders() instead.@Deprecated default String getHeader(String headerName)
header(String) ()} instead.headerName - The name of the header (case-insensitive)headerName, or null if it was not presentdefault Optional<String> header(String headerName)
headerName - The name of the header (case-insensitive)headerName, or empty if it was not presentdefault boolean hasHeader(String headerName)
headerName - The name of the header (case-insensitive)true if the request did contain the header.boolean hasBody()
Optional<String> contentType()
Optional<String> charset()
Optional<List<X509Certificate>> clientCertificateChain()
@Deprecated Map<String,String> tags()
attr, withAttr, etc.@Deprecated play.api.mvc.RequestHeader _underlyingHeader()
asScala()play.api.mvc.RequestHeader asScala()
RequestHeader