Accepts
play.api.mvc.AcceptExtractors.Accepts
object Accepts
Common extractors to check if a request accepts JSON, Html, etc. Example of use:
request match {
case Accepts.Json() => Ok(toJson(value))
case _ => Ok(views.html.show(value))
}
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Accepts.type
Members list
In this article