Skip to content

Commit 5d003b5

Browse files
committed
Use the correct content-type everywhere.
When we got our media type assignment, I forgot to actually update the examples. Thank you, @rkh! ❤️
1 parent a0b04c0 commit 5d003b5

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

format/index.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -592,8 +592,8 @@ elaborate on it further below.
592592
In general, this is a collection scoped to the **type** of document.
593593

594594
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.
597597

598598
Its root key **MUST** be the same as the root key provided in the
599599
server's response to `GET` request for the collection.
@@ -605,7 +605,7 @@ photos:
605605
GET /photos
606606
607607
HTTP/1.1 200 OK
608-
Content-Type: application/json
608+
Content-Type: application/vnd.api+json
609609
610610
{
611611
"photos": [{
@@ -619,8 +619,8 @@ You would create a new photo by `POST`ing to the same URL:
619619

620620
```text
621621
POST /photos
622-
Content-Type: application/json
623-
Accept: application/json
622+
Content-Type: application/vnd.api+json
623+
Accept: application/vnd.api+json
624624
625625
{
626626
"photos": [{
@@ -641,7 +641,7 @@ include a `meta` section in all of its responses with the key
641641
GET /photos
642642
643643
HTTP/1.1 200 OK
644-
Content-Type: application/json
644+
Content-Type: application/vnd.api+json
645645
646646
{
647647
"posts": [{
@@ -662,8 +662,8 @@ string.
662662

663663
```text
664664
POST /photos
665-
Content-Type: application/json
666-
Accept: application/json
665+
Content-Type: application/vnd.api+json
666+
Accept: application/vnd.api+json
667667
668668
{
669669
"photos": [{
@@ -696,7 +696,7 @@ Example:
696696
```text
697697
HTTP/1.1 201 Created
698698
Location: http://example.com/photos/12
699-
Content-Type: application/json
699+
Content-Type: application/vnd.api+json
700700
701701
{
702702
"photos": [{
@@ -734,7 +734,7 @@ For example, consider this `GET` request:
734734
GET /photos/1
735735
736736
HTTP/1.1 200 OK
737-
Content-Type: application/json
737+
Content-Type: application/vnd.api+json
738738
739739
{
740740
"photos": [{
@@ -775,7 +775,7 @@ For example, for the following `GET` request:
775775

776776
```text
777777
GET /photos/1
778-
Content-Type: application/json
778+
Content-Type: application/vnd.api+json
779779
780780
{
781781
"links": {
@@ -799,7 +799,7 @@ To change the author to person 2, issue a `PATCH` request to
799799
```text
800800
PATCH /photos/1
801801
Content-Type: application/json-patch+json
802-
Accept: application/json
802+
Accept: application/vnd.api+json
803803
804804
[
805805
{ "op": "replace", "path": "/photos/0/links/author", "value": 2 }
@@ -819,7 +819,7 @@ For example, for the following `GET` request:
819819

820820
```text
821821
GET /photos/1
822-
Content-Type: application/json
822+
Content-Type: application/vnd.api+json
823823
824824
{
825825
"links": {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy