1

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?

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
metafoo
  • 95
  • 1
  • 8

0 Answers0