Tries to render the most acceptable result according to the request’s Accept header value.
Tries to render the most acceptable result according to the request’s Accept header value.
render { case Accepts.Html() => Ok(views.html.show(value)) case Accepts.Json() => Ok(Json.toJson(value)) }
A partial function returning a Result
for a given request media range
A result provided by f
, if it is defined for the current request media ranges, otherwise NotAcceptable