restful way for deleting a bunch of items

Posted by keisimone on Stack Overflow See other posts from Stack Overflow or by keisimone
Published on 2010-03-10T23:55:47Z Indexed on 2010/03/15 6:39 UTC
Read the original article Hit count: 272

Filed under:
|
|
|

In wiki article for REST

it is indicated that if you use http://example.com/resources DELETE, that means you are deleting the entire collection.

If you use http://example.com/resources/7HOU57Y DELETE, that means you are deleting that element.

I am doing a WEBSITE, note NOT WEB SERVICE.

I have a list that has 1 checkbox for each item on the list. Once i select multiple items for deletion, i will allow users to press a button called DELETE SELECTION. If user presses the button, a js dialog box will popup asking user to confirm the deletion. if user confirms, all the items are deleted.

So how should i cater for deleting multiple items in a RESTFUL way?

NOTE, currently for DELETE in a webpage, what i do is i use FORM tag with POST as action but include a _method with the value DELETE since this is what was indicated by others in SO on how to do RESTful delete for webpage.

© Stack Overflow or respective owner

Related posts about rest

Related posts about restful