Closed Inkdpixels closed 3 years ago
Hi, @Inkdpixels could you provide some examples? I'm not aware of any.
Hey @StarpTech - I do not have any public examples, but take for example the Mime-Type application/geo+json
, it is an official mime type which APIs can use to indicate that the response is not only JSON, but structured in a way that was specified by the GeoJSON spec
https://geojson.org/ https://www.rfc-editor.org/rfc/rfc7946.html
There are loads of other json like mime types, see https://www.iana.org/assignments/media-types/media-types.xhtml
I see no value in adding it when no user has an issue. I also don't know any popular fetching library that takes care of it. I will close it. Feel free to reopen if you need to support this.
As of now this datasource strictly checks against the
application/json
http content-type header. This is perfectly fine for most applications, however some APIs respond with JSON content types, such as ...application/sen+json
https://www.rfc-editor.org/rfc/rfc8428.htmlapplication/problem+json
https://www.rfc-editor.org/rfc/rfc7807.htmlin which case the Dataloader does not parse the response body. It would be great if this package could extend it's list or improve the detection via a RegExp to ensure all content-types that are JSON like are being parsed.