Package play.mvc
Interface Http.Request
-
- All Superinterfaces:
Http.RequestHeader
- All Known Implementing Classes:
Http.RequestImpl
,play.core.j.RequestImpl
- Enclosing class:
- Http
public static interface Http.Request extends Http.RequestHeader
An HTTP request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description <A> Http.Request
addAttr(TypedKey<A> key, A value)
Create a new versions of this object with the given attribute attached to it.Http.Request
addAttrs(List<TypedEntry<?>> entries)
Create a new versions of this object with the given attributes attached to it.Http.Request
addAttrs(TypedEntry<?> e1)
Create a new versions of this object with the given attribute attached to it.Http.Request
addAttrs(TypedEntry<?> e1, TypedEntry<?> e2)
Create a new versions of this object with the given attributes attached to it.Http.Request
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()
Http.RequestBody
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(String code)
Deprecated.default Http.Request
withTransientLang(Locale locale)
Create a new version of this object with the given transient language set.default Http.Request
withTransientLang(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 Detail
-
body
Http.RequestBody body()
- Returns:
- the request body
-
withBody
Http.Request withBody(Http.RequestBody body)
Description copied from interface:Http.RequestHeader
Attach a body to this header.- Specified by:
withBody
in interfaceHttp.RequestHeader
- Parameters:
body
- The body to attach.- Returns:
- A new request with the body attached to the header.
-
withAttrs
Http.Request withAttrs(TypedMap newAttrs)
Description copied from interface:Http.RequestHeader
Create a new version of this object with the given attributes attached to it.- Specified by:
withAttrs
in interfaceHttp.RequestHeader
- Parameters:
newAttrs
- The new attributes to add.- Returns:
- The new version of this object with the attributes attached.
-
addAttr
<A> Http.Request addAttr(TypedKey<A> key, A value)
Description copied from interface:Http.RequestHeader
Create a new versions of this object with the given attribute attached to it.- Specified by:
addAttr
in 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
Http.Request addAttrs(TypedEntry<?> e1)
Description copied from interface:Http.RequestHeader
Create a new versions of this object with the given attribute attached to it.- Specified by:
addAttrs
in interfaceHttp.RequestHeader
- Parameters:
e1
- The new attribute.- Returns:
- The new version of this object with the new attribute.
-
addAttrs
Http.Request addAttrs(TypedEntry<?> e1, TypedEntry<?> e2)
Description copied from interface:Http.RequestHeader
Create a new versions of this object with the given attributes attached to it.- Specified by:
addAttrs
in 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
Http.Request addAttrs(TypedEntry<?> e1, TypedEntry<?> e2, TypedEntry<?> e3)
Description copied from interface:Http.RequestHeader
Create a new versions of this object with the given attributes attached to it.- Specified by:
addAttrs
in 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
Http.Request addAttrs(List<TypedEntry<?>> entries)
Description copied from interface:Http.RequestHeader
Create a new versions of this object with the given attributes attached to it.- Specified by:
addAttrs
in interfaceHttp.RequestHeader
- Parameters:
entries
- The new attributes.- Returns:
- The new version of this object with the new attributes.
-
removeAttr
Http.Request removeAttr(TypedKey<?> key)
Description copied from interface:Http.RequestHeader
Create a new versions of this object with the given attribute removed.- Specified by:
removeAttr
in interfaceHttp.RequestHeader
- Parameters:
key
- The key of the attribute to remove.- Returns:
- The new version of this object with the attribute removed.
-
withTransientLang
default Http.Request withTransientLang(Lang lang)
Description copied from interface:Http.RequestHeader
Create 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:
withTransientLang
in interfaceHttp.RequestHeader
- Parameters:
lang
- The language to use.- Returns:
- The new version of this object with the given transient language set.
-
withTransientLang
@Deprecated default Http.Request withTransientLang(String code)
Deprecated.Description copied from interface:Http.RequestHeader
Create 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:
withTransientLang
in interfaceHttp.RequestHeader
- Parameters:
code
- The language to use.- Returns:
- The new version of this object with the given transient language set.
-
withTransientLang
default Http.Request withTransientLang(Locale locale)
Description copied from interface:Http.RequestHeader
Create 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:
withTransientLang
in interfaceHttp.RequestHeader
- Parameters:
locale
- The language to use.- Returns:
- The new version of this object with the given transient language set.
-
withoutTransientLang
default Http.Request withoutTransientLang()
Description copied from interface:Http.RequestHeader
Create a new version of this object with the given transient language removed.- Specified by:
withoutTransientLang
in interfaceHttp.RequestHeader
- Returns:
- The new version of this object with the transient language removed.
-
asScala
play.api.mvc.Request<Http.RequestBody> asScala()
- Specified by:
asScala
in interfaceHttp.RequestHeader
- Returns:
- the underlying (Scala API) request.
- See Also:
RequestHeader
-
-