Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch types via Patch-Type instead of Content-Type #126

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions draft-toomim-httpbis-braid-http-03.txt
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,15 @@ Table of Contents

The previous example uses the Range Patch format, which is defined in
[RANGE-PATCH]. However, one can use any patch format, by sending a
patch with a Content-Type set to a patch format with a defined
behavior, such as application/json-patch+json (as specified in
[RFC6902]):
patch with a Patch-Type set to a content-type with a defined behavior
for the HTTP PATCH method, such as application/json-patch+json (as
specified in [RFC6902]):


Request:

PUT /chat

Version: "up12vyc5ib" | Update
Parents: "2bcbi84nsp" |
Content-Length: 371 |
Expand All @@ -339,7 +340,7 @@ Table of Contents
Patches: 1 |
|
Content-Length: 288 | | Patch
Content-Type: application/json-patch+json | |
Patch-Type: application/json-patch+json | |
| |
[ | |
{"op": "test", "path": "/a/b/c", "value": "foo"}, | |
Expand All @@ -356,7 +357,7 @@ Table of Contents



Every patch MUST include either a Content-Type or a Content-Range.
Every patch MUST include either a Patch-Type or a Content-Range.


2.4. GET a specific version
Expand Down Expand Up @@ -490,7 +491,7 @@ Table of Contents
Patches: 1 |
|
Content-Length: 288 | | Patch
Content-Type: application/json-patch+json | |
Patch-Type: application/json-patch+json | |
| |
[ | |
{"op": "test", "path": "/a/b/c", "value": "foo"}, | |
Expand Down