-3

Deletion can be achieved through HTTP POST, so why do we need a separate HTTP verb called DELETE?

Mureinik
  • 297,002
  • 52
  • 306
  • 350
Arun Ullas
  • 13
  • 1
  • 1
    Possible duplicate of [REST API - why use PUT DELETE POST GET?](https://stackoverflow.com/questions/4573305/rest-api-why-use-put-delete-post-get) **and** [Use POST for delete/update in Rest?](https://stackoverflow.com/questions/46167855/use-post-for-delete-update-in-rest) – adiga Nov 13 '17 at 08:09
  • This is not related to MVC, but to HTTP methods. – Matthieu Charbonnier Nov 13 '17 at 16:06

1 Answers1

1

To quote Jurassic Park:

enter image description here

Having a DELETE verb is a convention. It makes your API easily exploitable and self-descriptive.

Technically, you could just use a GET verb with a action= and data= URL parameters to do any CRUD operation, but that would be unintuitive, making your application hard to use (and to maintain!) by anyone other than yourself.

Mureinik
  • 297,002
  • 52
  • 306
  • 350