playframework/Play20 — pull request #212 by julienrf (2012-03-31 11:30:44+00:00)
Title: Helper to test request Accept content types

Provide a helper to check if the request accepts a given content type. Example of use in Scala:

```scala
def foo = Action { request =>
if (request.accepts(JSON)) {
Ok(toJson(MyModel.findAll))
} else {
Ok(views.html.list(MyModel.findAll))
}
}
```