2
votes

I'm developing now API for developers feature, which gives users API access to some functions of our product.

All responses are in json format.

HTTP Content-Type header in our server's response is text/plain; charset=utf-8

Should I send one of this:

  • application/json
  • text/x-json
  • text/json

instead of text/plain.

Or for API feature text/plain Content-Type is acceptable?

2

2 Answers

4
votes

I'd use application/json as mentioned in the official JSON spec.