The inferResponseType checks for ending of the media type:
if (mediaType.endsWith('/json') || mediaType.endsWith('+json')) {
But it's quite usual to have it like this:
content:
application/json; charset=utf-8:
...
Which breaks the inference and makes the responseType to be "blob".
Proposed solution:
It's enough for media type to include the "/json" and "+json" strings, not endsWith.
The inferResponseType checks for ending of the media type:
But it's quite usual to have it like this:
Which breaks the inference and makes the responseType to be "blob". Proposed solution: It's enough for media type to include the "/json" and "+json" strings, not endsWith.