@@ -592,8 +592,8 @@ elaborate on it further below.
592
592
In general, this is a collection scoped to the ** type** of document.
593
593
594
594
The request ** MUST** contain a ` Content-Type ` header whose value is
595
- ` application/json ` . It ** MUST** also include ` application/json ` as the
596
- only or highest quality factor.
595
+ ` application/vnd.api+ json ` . It ** MUST** also include ` application/vnd.api+ json `
596
+ as the only or highest quality factor.
597
597
598
598
Its root key ** MUST** be the same as the root key provided in the
599
599
server's response to ` GET ` request for the collection.
@@ -605,7 +605,7 @@ photos:
605
605
GET /photos
606
606
607
607
HTTP/1.1 200 OK
608
- Content-Type: application/json
608
+ Content-Type: application/vnd.api+ json
609
609
610
610
{
611
611
"photos": [{
@@ -619,8 +619,8 @@ You would create a new photo by `POST`ing to the same URL:
619
619
620
620
``` text
621
621
POST /photos
622
- Content-Type: application/json
623
- Accept: application/json
622
+ Content-Type: application/vnd.api+ json
623
+ Accept: application/vnd.api+ json
624
624
625
625
{
626
626
"photos": [{
@@ -641,7 +641,7 @@ include a `meta` section in all of its responses with the key
641
641
GET /photos
642
642
643
643
HTTP/1.1 200 OK
644
- Content-Type: application/json
644
+ Content-Type: application/vnd.api+ json
645
645
646
646
{
647
647
"posts": [{
@@ -662,8 +662,8 @@ string.
662
662
663
663
``` text
664
664
POST /photos
665
- Content-Type: application/json
666
- Accept: application/json
665
+ Content-Type: application/vnd.api+ json
666
+ Accept: application/vnd.api+ json
667
667
668
668
{
669
669
"photos": [{
@@ -696,7 +696,7 @@ Example:
696
696
``` text
697
697
HTTP/1.1 201 Created
698
698
Location: http://example.com/photos/12
699
- Content-Type: application/json
699
+ Content-Type: application/vnd.api+ json
700
700
701
701
{
702
702
"photos": [{
@@ -734,7 +734,7 @@ For example, consider this `GET` request:
734
734
GET /photos/1
735
735
736
736
HTTP/1.1 200 OK
737
- Content-Type: application/json
737
+ Content-Type: application/vnd.api+ json
738
738
739
739
{
740
740
"photos": [{
@@ -775,7 +775,7 @@ For example, for the following `GET` request:
775
775
776
776
``` text
777
777
GET /photos/1
778
- Content-Type: application/json
778
+ Content-Type: application/vnd.api+ json
779
779
780
780
{
781
781
"links": {
@@ -799,7 +799,7 @@ To change the author to person 2, issue a `PATCH` request to
799
799
``` text
800
800
PATCH /photos/1
801
801
Content-Type: application/json-patch+json
802
- Accept: application/json
802
+ Accept: application/vnd.api+ json
803
803
804
804
[
805
805
{ "op": "replace", "path": "/photos/0/links/author", "value": 2 }
@@ -819,7 +819,7 @@ For example, for the following `GET` request:
819
819
820
820
``` text
821
821
GET /photos/1
822
- Content-Type: application/json
822
+ Content-Type: application/vnd.api+ json
823
823
824
824
{
825
825
"links": {
0 commit comments