Trait/Object

play.api.mvc

RequestHeader

Related Docs: object RequestHeader | package mvc

Permalink

trait RequestHeader extends AnyRef

The HTTP request header. Note that it doesn’t contain the request body yet.

Self Type
RequestHeader
Annotations
@implicitNotFound( ... )
Source
RequestHeader.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RequestHeader
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def attrs: TypedMap

    Permalink

    A map of typed attributes associated with the request.

  2. abstract def connection: RemoteConnection

    Permalink

    The remote connection that made the request.

  3. abstract def headers: Headers

    Permalink

    The HTTP headers.

  4. abstract def method: String

    Permalink

    The HTTP method.

  5. abstract def target: RequestTarget

    Permalink

    The target of the HTTP request, i.e.

    The target of the HTTP request, i.e. the URI or path that was given on the first line of the request.

  6. abstract def version: String

    Permalink

    The HTTP version.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. lazy val acceptLanguages: Seq[Lang]

    Permalink

    The Request Langs extracted from the Accept-Language header and sorted by preference (preferred first).

  5. lazy val acceptedTypes: Seq[MediaRange]

    Permalink

    returns

    The media types list of the request’s Accept header, sorted by preference (preferred first).

  6. def accepts(mimeType: String): Boolean

    Permalink

    Check if this request accepts a given media type.

    Check if this request accepts a given media type.

    returns

    true if mimeType matches the Accept header, otherwise false

  7. def addAttr[A](key: TypedKey[A], value: A): RequestHeader

    Permalink

    Create a new versions of this object with the given attribute attached to it.

    Create a new versions of this object with the given attribute attached to it.

    A

    The type of value.

    key

    The new attribute key.

    value

    The attribute value.

    returns

    The new version of this object with the new attribute.

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. lazy val charset: Option[String]

    Permalink

    Returns the charset of the request for text-based body

  10. final def clientCertificateChain: Option[Seq[X509Certificate]]

    Permalink

    The X509 certificate chain presented by a client during SSL requests.

    The X509 certificate chain presented by a client during SSL requests. This method is equivalent to connection.clientCertificateChain.

  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. lazy val contentType: Option[String]

    Permalink

    Returns the value of the Content-Type header (without the parameters (eg charset))

  13. def cookies: Cookies

    Permalink

    The HTTP cookies.

    The HTTP cookies. The request's cookies are stored in an attribute indexed by play.api.mvc.request.RequestAttrKey.Cookies. The attribute uses a Cell to store the cookies, to allow them to be evaluated on-demand.

  14. lazy val domain: String

    Permalink

    The HTTP domain.

    The HTTP domain. The domain part of the request's host.

  15. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def flash: Flash

    Permalink

    Parses the Flash cookie and returns the Flash data.

    Parses the Flash cookie and returns the Flash data. The request's flash cookie is stored in an attribute indexed by play.api.mvc.request.RequestAttrKey.Flash. The attribute uses a play.api.mvc.request.Cell to store the session, to allow it to be evaluated on-demand.

  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. def getQueryString(key: String): Option[String]

    Permalink

    Helper method to access a queryString parameter.

    Helper method to access a queryString parameter. This method delegates to connection.getQueryParameter(key).

    returns

    The query parameter's value if the parameter is present and there is only one value. If the parameter is absent or there is more than one value for that parameter then None is returned.

  21. def hasBody: Boolean

    Permalink

    True if this request has a body, so we know if we should trigger body parsing.

    True if this request has a body, so we know if we should trigger body parsing. The base implementation simply checks for the Content-Length or Transfer-Encoding headers, but subclasses (such as fake requests) may return true in other cases so the headers need not be updated to reflect the body.

  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. lazy val host: String

    Permalink

    The HTTP host (domain, optionally port).

    The HTTP host (domain, optionally port). This value is derived from the request target, if a hostname is present. If the target doesn't have a host then the Host header is used, if present. If that's not present then an empty string is returned.

  24. final def id: Long

    Permalink

    The request id.

    The request id. The request id is stored as an attribute indexed by play.api.mvc.request.RequestAttrKey.Id.

  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. lazy val mediaType: Option[MediaType]

    Permalink

    The media type of this request.

    The media type of this request. Same as contentType, except returns a fully parsed media type with parameters.

  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def path: String

    Permalink

    The URI path.

    The URI path. This method delegates to target.path.

  31. final def queryString: Map[String, Seq[String]]

    Permalink

    The parsed query string.

    The parsed query string. This method delegates to target.queryMap.

  32. def rawQueryString: String

    Permalink

    Returns the raw query string.

    Returns the raw query string. This method delegates to connection.rawQueryString.

  33. final def remoteAddress: String

    Permalink

    The client IP address.

    The client IP address.

    retrieves the last untrusted proxy from the Forwarded-Headers or the X-Forwarded-*-Headers.

    This method delegates to connection.remoteAddressString.

  34. final def secure: Boolean

    Permalink

    Is the client using SSL? This method delegates to connection.secure.

  35. def session: Session

    Permalink

    Parses the Session cookie and returns the Session data.

    Parses the Session cookie and returns the Session data. The request's session cookie is stored in an attribute indexed by play.api.mvc.request.RequestAttrKey.Session. The attribute uses a Cell to store the session cookie, to allow it to be evaluated on-demand.

  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  37. def toString(): String

    Permalink
    Definition Classes
    RequestHeader → AnyRef → Any
  38. final def uri: String

    Permalink

    The complete request URI, containing both path and query string.

    The complete request URI, containing both path and query string. The URI is what was on the status line after the request method. E.g. in "GET /foo/bar?q=s HTTP/1.1" the URI should be /foo/bar?q=s. It could be absolute, some clients send absolute URLs, especially proxies, e.g. http://www.example.org/foo/bar?q=s.

    This method delegates to target.uriString.

  39. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. def withAttrs(newAttrs: TypedMap): RequestHeader

    Permalink

    Create a new version of this object with the given attributes attached to it.

    Create a new version of this object with the given attributes attached to it. This replaces any existing attributes.

    newAttrs

    The new attributes to add.

    returns

    The new version of this object with the attributes attached.

  43. def withBody[A](body: A): Request[A]

    Permalink

    Attach a body to this header.

    Attach a body to this header.

    A

    The type of the body.

    body

    The body to attach.

    returns

    A new request with the body attached to the header.

  44. def withConnection(newConnection: RemoteConnection): RequestHeader

    Permalink
  45. def withHeaders(newHeaders: Headers): RequestHeader

    Permalink

    The remote connection that made the request.

  46. def withMethod(newMethod: String): RequestHeader

    Permalink

    Return a new copy of the request with its method changed.

  47. def withTag(tagName: String, tagValue: String): RequestHeader

    Permalink

    Convenience method for adding a single tag to this request

    Convenience method for adding a single tag to this request

    returns

    the tagged request

  48. def withTarget(newTarget: RequestTarget): RequestHeader

    Permalink

    Return a new copy of the request with its target changed.

  49. def withVersion(newVersion: String): RequestHeader

    Permalink

    Return a new copy of the request with its HTTP version changed.

Deprecated Value Members

  1. def copy(id: Long = null, tags: Map[String, String] = null, uri: String = null, path: String = null, method: String = this.method, version: String = this.version, queryString: Map[String, Seq[String]] = null, headers: Headers = null, remoteAddress: String = null, secure: Boolean = null, clientCertificateChain: Option[Seq[X509Certificate]] = null): RequestHeader

    Permalink

    Copy the request.

    Copy the request.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use the with* methods instead

  2. final def tags: Map[String, String]

    Permalink

    The request Tags.

    The request Tags. The request's tags are stored in an optional attribute indexed by play.api.mvc.request.RequestAttrKey.Tags. If the attribute is not present then the tags are assumed to be empty.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use typed attributes instead, see attrs

Inherited from AnyRef

Inherited from Any

Ungrouped