Content with charset breaks the responseType
See original GitHub issueThe 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”. I guess this can be considered as a bug…
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
HTTP response with content-type `text/html; charset="utf-8 ...
It seems Facebook's response has: text/html; charset="utf-8" as the content-type header. We are not removing the quotes, which seem to be ...
Read more >Can charset parameter be used with application/json content ...
It can only break clients that parse Content-Type header incorrectly e.g., by comparing it verbatim with "application/json" or clients that ...
Read more >UTF-8 fix breaks content-type headers?
This fixes the queryBuilder returning data with the wrong charset in the servlet, but has the side effect of making the response header...
Read more >HttpClient: How to remove charset from Content-Type header
I was writing client library for one online service and faced situation where I had to remove charset definition from Content-Type header.
Read more >The "charset=UTF-8" part is added for the Content-Type header
I expect a request Content-Type header to be application/json (like in 1.6. 7) but actually it's application/json; charset=UTF-8 . The changed behavior ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Zryru This was already fixed in version 0.17.1.
@luisfpg Done! https://github.com/cyclosproject/ng-openapi-gen/pull/155