Rails 5 API: Get params out of response.body without Content-Type Header set

398 views Asked by At

Unfortunately our API has to support requests made by XDomainRequest (IE9) which does not set the request's Content-Type header.

Now Rails (5 API only) seems not to parse any params out of the request body. I also tried submitting x-www-form-urlencoded data which didn't work either.

Actually, the plain body is present, but when I manually parse and inject the data into the params hash Rails crashes.

How do I get Rails to parse the request body (ideally JSON) without Content-Type set?

0

There are 0 answers