Comments (7)
The problem is that PATCH does not need explicitly a diff media type. We could expand the recipe by adding a diff media type (like a diff output) and show the result (and point out the non-idempotency as a drawback)
A non-diff media-type, like the example given, should stay, but we could explain what the result would be, which in this case would that the firstname of the user will be changed (in a idempotent way).
from restcookbook.
The set of changes is represented in a format called a "patch
document" identified by a media type.
and
With PATCH, however, the enclosed entity contains a set
of instructions describing how a resource currently residing on the
origin server should be modified to produce a new version.
from restcookbook.
I will try and see if I can get this sorted a bit better.. to be honest, PATCH is defined pretty vaguely when it comes to their media types.
from restcookbook.
Yeah, I'm not 100% happy with the spec, but what are you gonna do?
from restcookbook.
amend it :) I think the restcookbook.com should be a way to give people at least some examples on how to implement this. I don't think it's perfect, but at least if we can give some examples, with the pros and cons, it would at least give people some insight without trying to invent everything by itself.
from restcookbook.
👍
from restcookbook.
PATCH and PUT doesn't have same content type! Please read "Please do not patch like an idiot".
from restcookbook.
Related Issues (19)
- twitter bootstrap HOT 3
- Site Link HOT 1
- Change examples to full details
- Downloadable epub ebook HOT 4
- URIs in HATEAOS post HOT 4
- Code-on-demand HOT 4
- Will u a add a license to the book? HOT 2
- Isn't PATCH idempotent? HOT 1
- no links HATEOAS on Richardson Maturity Model page
- "fork me on github" is not accessible HOT 1
- Incorrect capitalization of Content-Type header HOT 1
- the use of the Location header with HTTP 202 is not actually supported
- Please clarify the license of restcookbook
- Possible mistake in put-vs-post
- HTTPS cert on your website HOT 3
- Links on the home page not working correctly. HOT 5
- PATCH is said to be and not be idempotent HOT 3
- OAuth2 is not draft anymore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from restcookbook.