public static interface Http.Request extends Http.RequestHeader
Modifier and Type | Method and Description |
---|---|
<A> Http.Request |
addAttr(TypedKey<A> key,
A value)
Create a new versions of this object with the given attribute attached to it.
|
play.api.mvc.Request<Http.RequestBody> |
asScala()
Return the Scala version of the request
|
Http.RequestBody |
body()
The request body.
|
Http.Request |
removeAttr(TypedKey<?> key)
Create a new versions of this object with the given attribute removed.
|
Http.Request |
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.
|
default Http.Request |
withoutTransientLang()
Create a new version of this object with the given transient language removed.
|
default Http.Request |
withTransientLang(Lang lang)
Create a new version of this object with the given transient language set.
|
default Http.Request |
withTransientLang(java.util.Locale locale)
Create a new version of this object with the given transient language set.
|
default Http.Request |
withTransientLang(java.lang.String code)
Create a new version of this object with the given transient language set.
|
acceptedTypes, acceptLanguages, accepts, attrs, charset, clientCertificateChain, contentType, cookie, cookies, flash, getHeaders, getQueryString, hasBody, hasHeader, header, host, id, method, path, queryString, remoteAddress, secure, session, transientLang, uri, version
Http.RequestBody body()
Http.Request withBody(Http.RequestBody body)
Http.RequestHeader
withBody
in interface Http.RequestHeader
body
- The body to attach.Http.Request withAttrs(TypedMap newAttrs)
Http.RequestHeader
withAttrs
in interface Http.RequestHeader
newAttrs
- The new attributes to add.<A> Http.Request addAttr(TypedKey<A> key, A value)
Http.RequestHeader
addAttr
in interface Http.RequestHeader
A
- the attribute typekey
- The new attribute key.value
- The attribute value.Http.Request removeAttr(TypedKey<?> key)
Http.RequestHeader
removeAttr
in interface Http.RequestHeader
key
- The key of the attribute to remove.default Http.Request withTransientLang(Lang lang)
Http.RequestHeader
MessagesApi#preferred(RequestHeader)
} (It will take precedence over any other language).withTransientLang
in interface Http.RequestHeader
lang
- The language to use.default Http.Request withTransientLang(java.lang.String code)
Http.RequestHeader
MessagesApi#preferred(RequestHeader)
} (It will take precedence over any other language).withTransientLang
in interface Http.RequestHeader
code
- The language to use.default Http.Request withTransientLang(java.util.Locale locale)
Http.RequestHeader
MessagesApi#preferred(RequestHeader)
} (It will take precedence over any other language).withTransientLang
in interface Http.RequestHeader
locale
- The language to use.default Http.Request withoutTransientLang()
Http.RequestHeader
withoutTransientLang
in interface Http.RequestHeader
play.api.mvc.Request<Http.RequestBody> asScala()
asScala
in interface Http.RequestHeader
Request