Content type 'text/json' should be 'application/json'
Closed this issue · 2 comments
drhumlen commented
application/json
is actually the correct type, not text/json
. This actually caused the server I made http requests towards to fail because it didn't recognize text/json
as a valid type.
SchlenkR commented
According to this post, RFC 4627 and personal experience, the mime type of choice should indeed be application/json
instead of text/json
.
I will merge the linked PR. Since this might be a breaking change to some applications, this will be included in the next major release 8.
As a workaround, please have a look at the test Explicitly specified content type is dominant, which shows how to force a specified content type.
Thanks for your issue and the PR, @drhumlen