play.api.mvc
Define a set of extractors allowing to pattern match on the Accept HTTP header of a request
Common extractors to check if a request accepts JSON, Html, etc.
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)) }
Define a set of extractors allowing to pattern match on the Accept HTTP header of a request