2 ms·
Coincidentally, I recently read this article, entitled “You Cannot Correctly Represent Change Without Immutability”: http://tapestryjava.blogspot.se/2012/07/you
by zacharyvoase 14y ago
Coincidentally, I recently read this article, entitled “You Cannot Correctly Represent Change Without Immutability”: http://tapestryjava.blogspot.se/2012/07/you-cannot-correctly-represent-change.html http://tapestryjava.blogspot.se/2012/07/you-cannot-correctly...
The point is, the ‘patch’ itself is a transformation defined by a 2-tuple of the old value and the delta (whereas a ‘put’ would be defined as the 2-tuple of the old value and the new value). Because the old value is referenced by the request URI (which is mutable), simply specifying the delta itself is not idempotent. Of course, following the RFC's advice and adding the ETag means you're specifying both the delta and the old value, which makes the operation idempotent.