Packages

class Headers extends AnyRef

The HTTP headers set.

Source
Headers.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Headers
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Headers(_headers: Seq[(String, String)])

    _headers

    The sequence of values. This value is protected and mutable since subclasses might initially set it to a null value and then initialize it lazily.

Value Members

  1. def add(headers: (String, String)*): Headers

    Append the given headers

  2. def apply(key: String): String

    Retrieves the first header value which is associated with the given key.

  3. lazy val asJava: mvc.Http.Headers
  4. def equals(that: Any): Boolean
    Definition Classes
    Headers → AnyRef → Any
  5. def get(key: String): Option[String]

    Optionally returns the first header value associated with a key.

  6. def getAll(key: String): Seq[String]

    Retrieve all header values associated with the given key.

  7. def hasBody: Boolean

    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.

  8. def hasHeader(headerName: String): Boolean

    Checks if the given header is present.

    Checks if the given header is present.

    headerName

    The name of the header (case-insensitive)

    returns

    true if the request did contain the header.

  9. def hashCode(): Int
    Definition Classes
    Headers → AnyRef → Any
  10. def headers: Seq[(String, String)]

    The headers as a sequence of name-value pairs.

  11. def keys: Set[String]

    Retrieve all header keys

  12. def remove(keys: String*): Headers

    Remove any headers with the given keys

  13. def replace(headers: (String, String)*): Headers

    Append the given headers, replacing any existing headers having the same keys

  14. lazy val toMap: Map[String, Seq[String]]

    Transform the Headers to a Map

  15. lazy val toSimpleMap: Map[String, String]

    Transform the Headers to a Map by ignoring multiple values.

  16. def toString(): String
    Definition Classes
    Headers → AnyRef → Any