Retrieve request body in HTTP request handler, Playframework 2.4

Viewed 127

I am using Playframework 2.4.11 and Scala 2.11.12. I am logging user access include request body

I create a request handler following ScalaHttpRequestHandlers and ScalaHttpFilters. but all I can get is just RequestHeader

reference to JavaHttpRequestHandlers. It is so easy to get request body

Anyone can tell me how to get request body in request handler for scala? Thank you

Update

reference to More-powerful-filters the doc said

Play provides a lower level filter API called EssentialFilter which gives you full access to the body of the request. This API allows you to wrap EssentialAction with another action.

But I can not find any clear way to retrieve the body from EssentialAction

Final Update

After research in one week. I gave up on the idea logging user access in request handler and I also found another way to do my task

Thank you everyone

0 Answers
Related