I\'m trying to implement a REST API with Play 2.0 (Scala) but I\'m getting stuck in POST method. How do I get the payload from Request object? I haven\'t find any documentation
You should be able to do the following:
def index = Action { request => val body = request.body }
And also things like:
def index = Action { request => val name = request.queryString.get("name").flatMap(_.headOption) Ok("Hello " + name.getOrElse("Guest")) }