Package play.mvc
Interface Http.Request
- All Superinterfaces:
Http.RequestHeader
- All Known Implementing Classes:
Http.RequestImpl,play.core.j.RequestImpl
- Enclosing class:
- Http
An HTTP request.
-
Method Summary
Modifier and TypeMethodDescription<A> Http.RequestCreate a new versions of this object with the given attribute attached to it.addAttrs(List<TypedEntry<?>> entries) Create a new versions of this object with the given attributes attached to it.addAttrs(TypedEntry<?> e1) Create a new versions of this object with the given attribute attached to it.addAttrs(TypedEntry<?> e1, TypedEntry<?> e2) Create a new versions of this object with the given attributes attached to it.addAttrs(TypedEntry<?> e1, TypedEntry<?> e2, TypedEntry<?> e3) Create a new versions of this object with the given attributes attached to it.play.api.mvc.Request<Http.RequestBody>asScala()body()removeAttr(TypedKey<?> key) Create a new versions of this object with the given attribute removed.Create a new version of this object with the given attributes attached to it.withBody(Http.RequestBody body) Attach a body to this header.default Http.RequestCreate a new version of this object with the given transient language removed.default Http.RequestwithTransientLang(String code) Deprecated.default Http.RequestwithTransientLang(Locale locale) Create a new version of this object with the given transient language set.default Http.RequestwithTransientLang(Lang lang) Create a new version of this object with the given transient language set.Methods inherited from interface play.mvc.Http.RequestHeader
acceptedTypes, acceptLanguages, accepts, attrs, charset, clientCertificateChain, contentType, cookie, cookies, flash, getCookie, getHeaders, getQueryString, hasBody, hasHeader, header, headers, host, id, method, path, queryString, queryString, remoteAddress, secure, session, transientLang, uri, version
-
Method Details
-
body
Http.RequestBody body()- Returns:
- the request body
-
withBody
Description copied from interface:Http.RequestHeaderAttach a body to this header.- Specified by:
withBodyin interfaceHttp.RequestHeader- Parameters:
body- The body to attach.- Returns:
- A new request with the body attached to the header.
-
withAttrs
Description copied from interface:Http.RequestHeaderCreate a new version of this object with the given attributes attached to it.- Specified by:
withAttrsin interfaceHttp.RequestHeader- Parameters:
newAttrs- The new attributes to add.- Returns:
- The new version of this object with the attributes attached.
-
addAttr
Description copied from interface:Http.RequestHeaderCreate a new versions of this object with the given attribute attached to it.- Specified by:
addAttrin interfaceHttp.RequestHeader- Type Parameters:
A- the attribute type- Parameters:
key- The new attribute key.value- The attribute value.- Returns:
- The new version of this object with the new attribute.
-
addAttrs
Description copied from interface:Http.RequestHeaderCreate a new versions of this object with the given attribute attached to it.- Specified by:
addAttrsin interfaceHttp.RequestHeader- Parameters:
e1- The new attribute.- Returns:
- The new version of this object with the new attribute.
-
addAttrs
Description copied from interface:Http.RequestHeaderCreate a new versions of this object with the given attributes attached to it.- Specified by:
addAttrsin interfaceHttp.RequestHeader- Parameters:
e1- The first new attribute.e2- The second new attribute.- Returns:
- The new version of this object with the new attributes.
-
addAttrs
Description copied from interface:Http.RequestHeaderCreate a new versions of this object with the given attributes attached to it.- Specified by:
addAttrsin interfaceHttp.RequestHeader- Parameters:
e1- The first new attribute.e2- The second new attribute.e3- The third new attribute.- Returns:
- The new version of this object with the new attributes.
-
addAttrs
Description copied from interface:Http.RequestHeaderCreate a new versions of this object with the given attributes attached to it.- Specified by:
addAttrsin interfaceHttp.RequestHeader- Parameters:
entries- The new attributes.- Returns:
- The new version of this object with the new attributes.
-
removeAttr
Description copied from interface:Http.RequestHeaderCreate a new versions of this object with the given attribute removed.- Specified by:
removeAttrin interfaceHttp.RequestHeader- Parameters:
key- The key of the attribute to remove.- Returns:
- The new version of this object with the attribute removed.
-
withTransientLang
Description copied from interface:Http.RequestHeaderCreate a new version of this object with the given transient language set. The transient language will be taken into account when usingMessagesApi.preferred(RequestHeader)} (It will take precedence over any other language).- Specified by:
withTransientLangin interfaceHttp.RequestHeader- Parameters:
lang- The language to use.- Returns:
- The new version of this object with the given transient language set.
-
withTransientLang
Deprecated.Description copied from interface:Http.RequestHeaderCreate a new version of this object with the given transient language set. The transient language will be taken into account when usingMessagesApi.preferred(RequestHeader)} (It will take precedence over any other language).- Specified by:
withTransientLangin interfaceHttp.RequestHeader- Parameters:
code- The language to use.- Returns:
- The new version of this object with the given transient language set.
-
withTransientLang
Description copied from interface:Http.RequestHeaderCreate a new version of this object with the given transient language set. The transient language will be taken into account when usingMessagesApi.preferred(RequestHeader)} (It will take precedence over any other language).- Specified by:
withTransientLangin interfaceHttp.RequestHeader- Parameters:
locale- The language to use.- Returns:
- The new version of this object with the given transient language set.
-
withoutTransientLang
Description copied from interface:Http.RequestHeaderCreate a new version of this object with the given transient language removed.- Specified by:
withoutTransientLangin interfaceHttp.RequestHeader- Returns:
- The new version of this object with the transient language removed.
-
asScala
play.api.mvc.Request<Http.RequestBody> asScala()- Specified by:
asScalain interfaceHttp.RequestHeader- Returns:
- the underlying (Scala API) request.
- See Also:
-
RequestHeader
-