Is REST DELETE really idempotent?

后端 未结 8 2320
一生所求
一生所求 2020-11-30 18:43

DELETE is supposed to be idempotent.

If I DELETE http://example.com/account/123 it\'s going to delete the account.

If I do it again would I expect a 404, sin

8条回答
  •  臣服心动
    2020-11-30 19:05

    From the HTTP RFC:

    Methods can also have the property of "idempotence" in that (aside from error or expiration issues) the side-effects of N > 0 identical requests is the same as for a single request.

    Note that's "side effects", not "response".

提交回复
热议问题