public static interface Http.Request extends Http.RequestHeader
Modifier and Type | Method and Description |
---|---|
play.api.mvc.Request<Http.RequestBody> |
_underlyingRequest()
Deprecated.
As of release 2.6.0. Use
asScala() |
<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.
|
java.lang.String |
username()
Deprecated.
As of release 2.6, use
attrs.get(Security.USERNAME) or
attrs.getOptional(Security.USERNAME) . |
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.
|
Http.Request |
withUsername(java.lang.String username)
Deprecated.
As of release 2.6, use
req.withAttrs(req.attrs().put(Security.USERNAME, username)) . |
_underlyingHeader, acceptedTypes, acceptLanguages, accepts, attrs, charset, clientCertificateChain, contentType, cookie, cookies, getHeader, getHeaders, getQueryString, hasBody, hasHeader, header, headers, host, method, path, queryString, remoteAddress, secure, tags, 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.@Deprecated java.lang.String username()
attrs.get(Security.USERNAME)
or
attrs.getOptional(Security.USERNAME)
.@Authenticated
.@Deprecated Http.Request withUsername(java.lang.String username)
req.withAttrs(req.attrs().put(Security.USERNAME, username))
.username
- the new user name@Deprecated play.api.mvc.Request<Http.RequestBody> _underlyingRequest()
asScala()
play.api.mvc.Request<Http.RequestBody> asScala()
asScala
in interface Http.RequestHeader
Request