Greetings,
The new version of net-http 0.7.0 breaks HTTParty indirectly. Here is the releases change log: https://github.com/ruby/net-http/releases
Default Content-Type Removed
The default behavior of automatically setting the Content-Type header to application/x-www-form-urlencoded for requests with a body (e.g., POST, PUT) when the header was not explicitly set has been removed.
For us we found out about this for the below code:
response = HTTParty.post(
'https://www.google.com/recaptcha/api/siteverify',
body: encoded
)
In this case, google was expecting: 'Content-Type: application/x-www-form-urlencoded'
Changing our code to this fixed the issue:
response = HTTParty.post(
'https://www.google.com/recaptcha/api/siteverify',
headers: { 'Content-Type' => 'application/x-www-form-urlencoded' },
body: encoded
)
No action is requested, this is just to inform you.