By Alvin Alexander. Last updated: April 24, 2018
As a quick note to self, here’s how to just printed some HTTP request information in a Play Framework controller action:
def login = Action { implicit request =>
println("*** ENTERED 'login' ACTION ***")
println(s" content-type: ${request.contentType}")
println(s" headers: ${request.headers}")
println(s" body: ${request.body}")
println(s" query string: ${request.rawQueryString}")
...
}
The rest of the code doesn’t matter, I just wanted to show how to access the request information in a Play controller action method.

