Friday, April 29, 2011

API for developers. What Content-Type should I use?

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?

From stackoverflow

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.