Read body for PUT/POST requests
Refactoring