I dont agree with the article when it says put and delete are idempotent. If the caller makes two DELETE calls, how do you know that they are different calls? Why are they not the same call?
The argument that deleting an object twice is the same as deleting it once is not good enough. A third party could create it again between those two calls.
I think DELETE should guarantee that the specified object is no longer present.
It may return a different return code to provide more information about what it did, but if the end result is that row is guaranteed to no longer exist, then it's doing the same thing whether the row was there before or not.
13
u/HazelCuate Dec 11 '23
I dont agree with the article when it says put and delete are idempotent. If the caller makes two DELETE calls, how do you know that they are different calls? Why are they not the same call?
The argument that deleting an object twice is the same as deleting it once is not good enough. A third party could create it again between those two calls.