Q:

Use of Accept-charset HTTP header

What are the differences and advantages of using one over the other:
Accept: application/json;charset=utf-8

versus:
Accept: application/json
Accept-Charset: utf-8

Is the first form compliant to rfc 2616?
Note: could be json or xml, etc.

A:

Both of them are compliant. But I prefer second one.
"charset" parameter is for media type and media types are defined by IANA, not by RFC 2616.

Even if the server understands RFC 2616, you cannot be sure it understands "charset" parameter.
Some media types may not have "charset" parameter.

