public static class Http.RequestImpl extends play.core.j.RequestHeaderImpl implements Http.Request
Constructor and Description |
---|
RequestImpl(play.api.mvc.Request<Http.RequestBody> request)
Constructor with a requestbody.
|
RequestImpl(play.api.mvc.RequestHeader header)
Constructor only based on a header.
|
Modifier and Type | Method and Description |
---|---|
play.api.mvc.Request<Http.RequestBody> |
_underlyingRequest()
For internal Play-use only
|
Http.RequestBody |
body()
The request body.
|
void |
setUsername(java.lang.String username)
Sets the username.
|
java.lang.String |
username()
The user name for this request, if defined.
|
Http.Request |
withUsername(java.lang.String username)
This method returns a new request, based on the current underlying with a giving username.
|
_underlyingHeader, acceptedTypes, acceptLanguages, accepts, cookie, cookies, getHeader, getQueryString, hasHeader, headers, host, method, path, queryString, remoteAddress, secure, toString, uri, version
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
_underlyingHeader, acceptedTypes, acceptLanguages, accepts, cookie, cookies, getHeader, getQueryString, hasHeader, headers, host, method, path, queryString, remoteAddress, secure, uri, version
public RequestImpl(play.api.mvc.RequestHeader header)
header
- the header from a requestpublic RequestImpl(play.api.mvc.Request<Http.RequestBody> request)
request
- the body of the requestpublic Http.RequestBody body()
Http.Request
body
in interface Http.Request
public java.lang.String username()
Http.Request
@Authenticated
.username
in interface Http.Request
public void setUsername(java.lang.String username)
setUsername
in interface Http.Request
username
- the username of the requesterpublic Http.Request withUsername(java.lang.String username)
withUsername
in interface Http.Request
username
- the new user namepublic play.api.mvc.Request<Http.RequestBody> _underlyingRequest()
Http.Request
_underlyingRequest
in interface Http.Request