I am reading RESTful Web APIs by Leonard Richardson and Mike Amundsen. In chapter 11 they write about Pipelining in HTTP/1.1 (page 247):
A client may pipeline any series of idempotent HTTP requests, so long as the series as a whole is also idempotent. […]
I’m going to send two requests over a pipeline. First I’ll retrieve a representation of a resource, and then I’ll delete the resource:
GET /resource
DELETE /resource
GET and DELETE are idempotent, but their combination is not. If there’s a network problem after I send these requests, and I don’t get the first response out of the pipeline, I won’t be able to send the requests again and get the same result. The resource won’t be there anymore.
In my understanding, idempotency means that after sending a request several times the resource state is the same as after sending the request only once. In this particular case, the resource state stays the same, since the resource is still deleted after a second request.
Why do the authors refer to this request combination as not idempotent?