1
Would you like to know how I make a delete method that gets a list by parameters? I mean, instead of just passing the ID
of the item to be deleted, I want to allow you to be selected N
items and removed all at once, in a single request.
How to do this semantically and to meet the standards?
Hello André, thanks for the quick reply! ?
– fnx
I was gonna do it the way you said. But I wanted to try not to break the Restful pattern, and so I turned to the forum to find out how to do this in a semantic and standardized way.
– fnx
Whenever Cvoce is making a request, the legal is to send the data via POST, in this case, the data would be 'hidden' in the request and the URI would remain the same. The data would be transmitted via JSON in this case...
– Andre.Santarosa
André, this is exactly what I can’t do. kkk
– fnx
You see, REST preaches proper use of HTTP methods. In this case, I must make use of the @DELETE method that the HTTP protocol offers.
– fnx
Sorry, fnx... I’m actually kind of backend programing, front though I do, it’s not really my strong... Take a look at this answer... http://stackoverflow.com/questions/28054515/how-to-send-delete-with-json-to-the-rest-api-using-httpclient
– Andre.Santarosa