3 ms·
Interestingly enough, putting it in Content-Type is also invalid unless the mime type allows it. (Which, of course, is trivial if you're defining your own.) Sp
by jdmichal 10y ago
Interestingly enough, putting it in Content-Type is also invalid unless the mime type allows it. (Which, of course, is trivial if you're defining your own.)
Specifically, RFC 2616 specifies that clients SHOULD only specify parameters which are valid for the mime type [0]. This can get more restrictive; for instance, JSON-API (application/vnd.api+json) states that any parameters MUST result in 415 UNSUPPORTED MEDIA TYPE [1].
[0] https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3....
[1] http://jsonapi.org/format/ http://jsonapi.org/format/