@@ -28,26 +28,31 @@ interpreted as described in RFC 2119
28
28
29
29
## Content Negotiation <a href =" #content-negotiation " id =" content-negotiation " class =" headerlink " ></a >
30
30
31
- Clients ** MUST** send all JSON API data in request documents with
32
- the header ` Content-Type: application/vnd.api+json ` .
31
+ Clients ** MUST** send all JSON API data in request documents with the header
32
+ ` Content-Type: application/vnd.api+json ` , without any media type parameters .
33
33
34
- Clients ** MUST** ignore all parameters for the ` application/vnd.api+json `
35
- media type received in the ` Content-Type ` header of response documents.
34
+ If a client violates this requirement, servers ** MUST** respond with a
35
+ ` 415 Unsupported Media Type ` status code.
36
+
37
+ Clients that include the JSON API media type in their ` Accept ` header, ** MUST**
38
+ specify the media type there at least once without any media type parameters.
39
+
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.
43
+
44
+ Servers ** MUST** send all JSON API data in response documents with the header
45
+ ` Content-Type: application/vnd.api+json ` , without any media type parameters.
36
46
37
- Servers ** MUST** send all JSON API data in response documents with
38
- the header ` Content-Type: application/vnd.api+json ` .
47
+ Servers ** MUST NOT** send responses with the ` application/vnd.api+json ` media
48
+ type if the client has not indicated, using its ` Accept ` header, that it can
49
+ understand this format.
39
50
40
- Servers ** MUST** return a ` 406 Not Acceptable ` status code if the
41
- ` application/vnd.api+json ` media type is modified by the ` ext ` parameter in
42
- the ` Accept ` header of a request. Otherwise, servers ** MUST** return a `415
43
- Unsupported Media Type` status code if the ` application/vnd.api+json` media
44
- type is modified by the ` ext ` parameter in the ` Content-Type ` header of a
45
- request. Servers ** MUST** ignore all other parameters for the
46
- ` application/vnd.api+json ` media type in ` Accept ` and ` Content-Type `
47
- headers.
51
+ Clients ** MUST** ignore any parameters for the ` application/vnd.api+json `
52
+ media type received in the ` Content-Type ` header of response documents.
48
53
49
- > Note: These requirements may allow future versions of this specification
50
- to support an extension mechanism based upon the ` ext ` media type parameter .
54
+ > Note: These requirements exist to allow future versions of this specification
55
+ to use media type parameters for extension negotiation and versioning .
51
56
52
57
## Document Structure <a href =" #document-structure " id =" document-structure " class =" headerlink " ></a >
53
58
@@ -627,16 +632,6 @@ The following characters **MUST NOT** be used in member names:
627
632
Data, including resources and relationships, can be fetched by sending a
628
633
` GET ` request to an endpoint.
629
634
630
- Clients ** MUST** indicate that they can accept the JSON API media type, per
631
- the semantics of the HTTP ` Accept ` header. If present, this header value ** MUST**
632
- also include any media type extensions relevant to the request. Servers ** MUST**
633
- return a ` 406 Not Acceptable ` status code if this header specifies an
634
- unsupported media type.
635
-
636
- > Note: Servers may support multiple media types at any endpoint. For example,
637
- a server may choose to support ` text/html ` in order to simplify viewing content
638
- via a web browser.
639
-
640
635
Responses can be further refined with the optional features described below.
641
636
642
637
### Fetching Resources <a href =" #fetching-resources " id =" fetching-resources " class =" headerlink " ></a >
@@ -1133,10 +1128,6 @@ strategies.
1133
1128
A server ** MAY** allow resources of a given type to be created. It ** MAY**
1134
1129
also allow existing resources to be modified or deleted.
1135
1130
1136
- Any requests that contain content ** MUST** include a ` Content-Type ` header
1137
- whose value is ` application/vnd.api+json ` . This header value ** MUST** also
1138
- include media type extensions relevant to the request.
1139
-
1140
1131
A request ** MUST** completely succeed or fail (in a single "transaction"). No
1141
1132
partial updates are allowed.
1142
1133
0 commit comments