I got this when I did a POST with an empty body. I was using curl.
Something like:
curl -X POST http://url/
I added -d ” and it cleared up the issue.
curl -X POST http://url/ -d ''
In your case, you probably need to add some content to a :body => ” attribute in HTTParty.post