I have created a simple CRUD app in express and for deleting a entry i have used post method and not delete method.Most of the tutorials show deleting with delete method and using methodoverride. What is the difference between methodovverride with delete request and deleting with post request for CRUD apps? Is there some other ways to delete entrys?
Asked
Active
Viewed 183 times
0
-
1ohhh..Ok i get it – Akash Salunkhe Jun 09 '18 at 13:01
-
Why not DURC? But seriously the main "difference" is more by convention that not "everything" in the world agrees that you can have a body in the request of a DELETE. Quite a few server side implementations are happy with a request body, but others are not. So it's generally accepted that you use a POST or PUT when you want a request body. AFAIK express has no problem with a DELETE with a body. Kind of a broad question though, and the DELETE with body thing certainly has an answer here already. – Neil Lunn Jun 09 '18 at 13:04
-
[Is an entity body allowed for an HTTP DELETE request?](https://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request) – Neil Lunn Jun 09 '18 at 13:06