scalatra/scalatra — pull request #172 by mnylen (2012-04-18 07:44:44+00:00)
Title: Action results

A nicer syntax for returning responses from actions. With this users can do:

get("/file/:id") {
fileService.find(params("id")) match {
case Some(file) => Ok(file)
case None => NotFound("Sorry, the file could not be found")
}
}

It includes support for some of the most commonly used status codes from 2xx, 3xx, and 4xx categories.