sendgrid / ruby-http-client

SendGrid's Ruby HTTP Client for calling APIs
https://sendgrid.com
MIT License
23 stars 54 forks source link

Doesn't respect request_body type #94

Closed jacobmovingfwd closed 4 years ago

jacobmovingfwd commented 6 years ago

https://github.com/sendgrid/ruby-http-client/blob/74b7bff3c9cba4e4085de7e518e25bbf8997c4f6/lib/ruby_http_client.rb#L152

If the request_body is already a JSON String, this over-encodes it, instead of leaving it alone. This line should check and see if it's a Hash, and format it only if needed.