play.mvc
Class Http.Request

java.lang.Object
  extended by play.mvc.Http.Request
Enclosing class:
Http

public abstract static class Http.Request
extends java.lang.Object

An HTTP request.


Constructor Summary
Http.Request()
           
 
Method Summary
abstract  java.util.List<Lang> acceptLanguages()
          The Request Langs, extracted from the Accept-Language header.
abstract  Http.RequestBody body()
          The request body.
abstract  Http.Cookies cookies()
           
 java.lang.String getHeader(java.lang.String headerName)
          Retrieves a single header.
abstract  java.util.Map<java.lang.String,java.lang.String[]> headers()
          Retrieves all headers.
abstract  java.lang.String host()
          The request host.
abstract  java.lang.String method()
          The HTTP Method.
abstract  java.lang.String path()
          The URI path.
abstract  java.util.Map<java.lang.String,java.lang.String[]> queryString()
          The query string content.
 void setUsername(java.lang.String username)
          Defines the user name for this request.
abstract  java.lang.String uri()
          The complete request URI, containing both path and query string.
 java.lang.String username()
          The user name for this request, if defined.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Http.Request

public Http.Request()
Method Detail

uri

public abstract java.lang.String uri()
The complete request URI, containing both path and query string.


method

public abstract java.lang.String method()
The HTTP Method.


host

public abstract java.lang.String host()
The request host.


path

public abstract java.lang.String path()
The URI path.


acceptLanguages

public abstract java.util.List<Lang> acceptLanguages()
The Request Langs, extracted from the Accept-Language header.


queryString

public abstract java.util.Map<java.lang.String,java.lang.String[]> queryString()
The query string content.


body

public abstract Http.RequestBody body()
The request body.


cookies

public abstract Http.Cookies cookies()
Returns:
the request cookies

headers

public abstract java.util.Map<java.lang.String,java.lang.String[]> headers()
Retrieves all headers.

Returns:
headers

getHeader

public java.lang.String getHeader(java.lang.String headerName)
Retrieves a single header.


username

public java.lang.String username()
The user name for this request, if defined. This is usually set by annotating your Action with @Authenticated.


setUsername

public void setUsername(java.lang.String username)
Defines the user name for this request.