Packages

c

play.api.mvc

Accepting

case class Accepting(mimeType: String) extends Product with Serializable

Convenient class to generate extractors checking if a given mime type matches the Accept header of a request. Example of use:

val AcceptsMp3 = Accepting("audio/mp3")

Then:

request match {
  case AcceptsMp3() => ...
}
Source
RequestExtractors.scala
Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Accepting
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Accepting(mimeType: String)

Value Members

  1. val mimeType: String
  2. def productElementNames: Iterator[String]
    Definition Classes
    Product
  3. def unapply(mediaRange: MediaRange): Boolean
  4. def unapply(request: RequestHeader): Boolean