Receiving POST data in Rails 4 and reading request.body Receiving POST data in Rails 4 and reading request.body ruby ruby

Receiving POST data in Rails 4 and reading request.body


request.raw_post

Read the request body. This is useful for web services that need to work with raw requests directly.

http://api.rubyonrails.org/classes/ActionDispatch/Request.html#method-i-raw_post


You'll need to set the following headers in your post.

Content-Type: application/jsonAccept: application/json