News for hackers. Stuff that matters.
Re:Idempotent Web APIs: What benefit do I get? by dpark on Tuesday May 07, 2013 @11:45PM (#5672365)
No, I'm not. HTTP is a communications protocol. It doesn't dictate what a server should be doing internally, only how it should behave in the context of an HTTP session. If idempotency isn't important to the communications, why put it into the standard? For that matter, if idempotency is only relevant on the server side, then the server could do anything in response to a client request and it seems that the spec would be satisfied.

    void processRequest(httpcontext c)
    {
        // who cares?; this looks "idempotent" to everyone
        doSomethingArbitrary();
        c.status = rand();
    }
RFC 2616 specifically discusses resuming in the face of dropped connections. This is only feasible if calls are idempotent from the client perspective (as well as the server perspective).

There are no comments on this comment yet.