datasource-rest
datasource-rest copied to clipboard
fix: parse JSON body when Content-Type has charset
Or other parameters.
In accordance with RFC 9110^1, Content-Type contains first and foremost the media type. It can be followed by key-value pairs of parameters.
This change supports extracting the media type and effectively discarding the other parameters as these are currently irrelevant to body parsing. The result media type is then matched against previously used JSON type tests.
Closes apollographql#229 Closes apollographql#341