Why use two step approach to deleting multiple items with REST

后端 未结 3 842
广开言路
广开言路 2021-01-31 17:05

We all know the \'standard\' way of deleting a single item via REST is to send a single DELETE request to a URI example.com/Items/666. Grand, let\'s move on to dele

3条回答
  •  别那么骄傲
    2021-01-31 17:38

    I would argue that HTTP already provides a method of deleting multiple items in the form of persistent connections and pipelining. At the HTTP protocol level it is absolutely fine to request idempotent methods like DELETE in a pipelined way - that is, send all the DELETE requests at once on a single connection and wait for all the responses.

    This may be problematic for an AJAX client running in a browser since few browsers have pipelining support enabled by default. This is not the fault of HTTP, though, it is the fault of those specific clients.

提交回复
热议问题