Re:PATCH Method for HTTP
by ibotty on Wednesday July 04, 2012 @07:22AM
(#4198890)
yes. to quote the rfc:
[ Parent
| on HN ]
Yes, I saw that.
Personally, I think Post does a good enough job for that. I know it's technically supposed to create a sub-resource, but it seems to work for appending to the same resource just as well.
I'm a little uncertain of the case for using Patch to append rows to a database. Surely that's a case where Post does a better job?
POST would make more sense if each row is its own resource. PATCH would make more sense if the entire table is its own resource, without addressable sub-resources (rows).
As far as the spec is concerned, yes I agree.
On a more personal level, I'm of the opinion that Post can append to an existing resource, without adding a new resource.
Allowing for this practicality in the spec would allow Patch to be only idempotent.