3 ms·
I agree with most of what you said, but mapping CRUD directly onto the verbs is perhaps a little simplistic. See http://jcalcote.wordpress.com/2008/10/16/put-or
by SoftwareMaven 15y ago
I agree with most of what you said, but mapping CRUD directly onto the verbs is perhaps a little simplistic. See http://jcalcote.wordpress.com/2008/10/16/put-or-post-the-rest-of-the-story/ http://jcalcote.wordpress.com/2008/10/16/put-or-post-the-res... for a discussion on it. The very short version is that idempotency is important, POST must be used for non-idempotent updates, and there is no reason PUT can't be used to create if you know the ID of the resource.
- poutine 15y agoHTTP PATCH was created due to this problem, though I've not run across an API using it yet. http://greenbytes.de/tech/webdav/draft-dusseault-http-patch-11.html http://greenbytes.de/tech/webdav/draft-dusseault-http-patch-...
- SoftwareMaven 15y agoThe discussion here around the article I linked was my first introduction to PATCH. I would really like to see it implemented in Pyramid so my site can take advantage of it.