youknowone/VisualJSON — Issue #1: Post request header content type
Author: bkoc
Created: 2011-12-24 13:48:54+00:00
State: open

Post requests fail for rails servers.

Post request to a rails server does not pass the authenticity check. The request headers should be set to "Content-Type: application/json" to disable authenticity checks for a request.

Related: http://stackoverflow.com/questions/1245618/rails-invalidauthenticitytoken-for-json-xml-requests

It looks like this is the reason I'm getting unprocessable entity response with status 422 for post requests.

It would be very useful if request headers can be set explicitly for such requests.