What is the Correct JSON Content-Type for HTTP Headers?

Posted on September 17, 2019 at 2:23 pm

Many web services uses different content-type for JSON data, i.e:

application/json
application/x-javascript
text/javascript
text/x-javascript
text/x-json

But what is the correct content type to use for JSON data?

For JSON text you should use application/json (read more on RFC 4627).

For JSONP (runnable javascript) with callback, use application/javascript.

You should read also the complete list of MIME types.

Receive updates via email

Other Posts

Updated Posts