local-ch / lhc

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

Update Charset and Content-Type Headers #151

Closed cedricwider closed 5 years ago

cedricwider commented 5 years ago

Changes introduced in this PR:

Support json:api content-type

json:api is a content-type that some APIs support. It is documented in great detail here: https://jsonapi.org/

LHC/LHS can handle both content types and can safely state so in the accept header.

Introduce Accept-Charset header

Instead of appending the charset to the accept header, use the dedicated Accept-Charset header which takes precedence over the appended charset part in the Accept header.

TODO