local-ch / lhc

🚀 Advanced HTTP Client for Ruby. Fueled with interceptors.
GNU General Public License v3.0
43 stars 1 forks source link

Do not encode json formatted body twice #136

Closed 10xSebastian closed 6 years ago

10xSebastian commented 6 years ago

PATCH

LHC was trying to encode a given body in it's default format (JSON), even though it might have been already decoded.

This PR patches the previous behaviour. When a body, using the JSON format, is already encoded (a string), it does not encode it (again).