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() |
java.util.List<play.api.http.MediaRange> |
acceptedTypes() |
java.util.List<Lang> |
acceptLanguages()
The Request Langs extracted from the Accept-Language header and sorted by preference (preferred first).
|
boolean |
accepts(java.lang.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() |
java.util.Optional<java.lang.String> |
charset()
Get the charset of the request.
|
java.util.Optional<java.util.List<java.security.cert.X509Certificate>> |
clientCertificateChain()
The X509 certificate chain presented by a client during SSL requests.
|
java.util.Optional<java.lang.String> |
contentType()
Get the content type of the request.
|
Http.Cookie |
cookie(java.lang.String name) |
Http.Cookies |
cookies() |
java.lang.String |
getHeader(java.lang.String headerName)
Retrieves a single header.
|
java.lang.String |
getQueryString(java.lang.String key)
Helper method to access a queryString parameter.
|
boolean |
hasBody()
Checks if the request has a body.
|
boolean |
hasHeader(java.lang.String headerName)
Checks if the request has the header.
|
java.util.Map<java.lang.String,java.lang.String[]> |
headers()
Retrieves all headers.
|
java.lang.String |
host()
The request host.
|
java.lang.String |
method()
The HTTP Method.
|
java.lang.String |
path()
The URI path.
|
java.util.Map<java.lang.String,java.lang.String[]> |
queryString()
The query string content.
|
java.lang.String |
remoteAddress()
The client IP address.
|
boolean |
secure()
Is the client using SSL?
|
java.util.Map<java.lang.String,java.lang.String> |
tags()
Deprecated.
Use
attr , withAttr , etc. |
java.lang.String |
uri()
The complete request URI, containing both path and query string.
|
java.lang.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.
|
java.lang.String uri()
java.lang.String method()
java.lang.String version()
java.lang.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)
key
- The new attribute key.value
- The attribute value.Http.Request withBody(Http.RequestBody body)
body
- The body to attach.java.lang.String host()
java.lang.String path()
java.util.List<Lang> acceptLanguages()
java.util.List<play.api.http.MediaRange> acceptedTypes()
boolean accepts(java.lang.String mimeType)
mimeType
- the mimeType to check for support.mimeType
is in the Accept header, otherwise falsejava.util.Map<java.lang.String,java.lang.String[]> queryString()
java.lang.String getQueryString(java.lang.String key)
key
- the query string parameter to look upkey
.Http.Cookies cookies()
Http.Cookie cookie(java.lang.String name)
name
- Name of the cookie to retrievejava.util.Map<java.lang.String,java.lang.String[]> headers()
java.lang.String getHeader(java.lang.String headerName)
headerName
- The name of the header (case-insensitive)headerName
, or null if it was not presentboolean hasBody()
boolean hasHeader(java.lang.String headerName)
headerName
- The name of the header (case-insensitive)true
if the request did contain the header.java.util.Optional<java.lang.String> contentType()
java.util.Optional<java.lang.String> charset()
java.util.Optional<java.util.List<java.security.cert.X509Certificate>> clientCertificateChain()
@Deprecated java.util.Map<java.lang.String,java.lang.String> tags()
attr
, withAttr
, etc.@Deprecated play.api.mvc.RequestHeader _underlyingHeader()
asScala()
play.api.mvc.RequestHeader asScala()
RequestHeader