On 7/17/07, Erik Hetzner <[EMAIL PROTECTED]> wrote:
At Tue, 17 Jul 2007 17:37:38 -0700,
"John D. Mitchell" <[EMAIL PROTECTED]> wrote:
> Ah, well, actually, that's the point... Idempotence means you get
> the same effect. If the effect is that the resource has been e.g.,
> deleted successfully then, by definition, you should get the same
> status code and response for all of the DELETE calls.
I read this as 'side effect', like a side effect in functional
programming. I tend to agree that it would be good if you got then
same response, but the constraint is that you simply get the same side
effects, not the same actual response. OPTIONS, for instance, should
not have side effects, but it has a response.
If it has such side effects then it is, by definition, not idempotent.
In practice, some people share the view that it's okay to stretch the
definition to be looser.
Personally, I've done it both ways since it was convenient to have
some extra information in the response and/or status code. I just
didn't kid myself that the "function" was actually idempotent in those
cases and the only consumers of those resources were programs that, in
essence, I controlled.
Take care,
John