@@ -31,24 +31,19 @@ interpreted as described in RFC 2119
31
31
Clients ** MUST** send all JSON API data in request documents with the header
32
32
` Content-Type: application/vnd.api+json ` , without any media type parameters.
33
33
34
+ If a client violates this requirement, servers ** MUST** respond with a
35
+ ` 415 Unsupported Media Type ` status code.
36
+
34
37
Clients that include the JSON API media type in their ` Accept ` header, ** MUST**
35
38
specify the media type there at least once without any media type parameters.
36
39
37
- Servers ** MUST** return a ` 400 Bad Request ` status code if clients violate
38
- either of the requirements above. The server's response to such violations
39
- ** MUST** contain a JSON API document with an [ error object] ( #error-objects ) .
40
- The ` "href" ` member of that object ** MUST** be
41
- ` "http://jsonapi.org/errors/invalid-media-type-parameter" ` .
40
+ If a client violates this requirement, and its ` Accept ` header doesn't contain
41
+ any other media types that the server can produce, the server ** MUST** respond
42
+ with a ` 406 Not Acceptable ` status code.
42
43
43
44
Servers ** MUST** send all JSON API data in response documents with the header
44
45
` Content-Type: application/vnd.api+json ` , without any media type parameters.
45
46
46
- Clients ** MUST** ignore any parameters for the ` application/vnd.api+json `
47
- media type received in the ` Content-Type ` header of response documents.
48
-
49
- > Note: These requirements exist to allow future versions of this specification
50
- to use media type parameters for extension negotiation and versioning.
51
-
52
47
Servers ** MUST NOT** send responses with the ` application/vnd.api+json ` media
53
48
type if the client has not indicated, using its ` Accept ` header, that it can
54
49
understand this format.
@@ -60,6 +55,12 @@ considered to be sending "JSON API data" for the purposes of the requirement
60
55
above, but rather simple JSON data, and the client cannot rely on any of the
61
56
rules laid out in this specification.
62
57
58
+ Clients ** MUST** ignore any parameters for the ` application/vnd.api+json `
59
+ media type received in the ` Content-Type ` header of response documents.
60
+
61
+ > Note: These requirements exist to allow future versions of this specification
62
+ to use media type parameters for extension negotiation and versioning.
63
+
63
64
## Document Structure <a href =" #document-structure " id =" document-structure " class =" headerlink " ></a >
64
65
65
66
This section describes the structure of a JSON API document, which is identified
0 commit comments