Reputation: 77
I creating a REST application with php. I would like to know is there any advantage of using PUT method orver POST for updating ?
Also i can use GET for deleting why should i use DELETE
method ?
This application will be used by browser and mobile apps
Upvotes: 2
Views: 485
Reputation: 1830
If you develop your web application only for browser, you should go with post and get.
But e.g. REST-APIs should/could make use of the put and delete methods. So you could better define what action you want to execute on special resources. http://en.wikipedia.org/wiki/Representational_State_Transfer
taken from what's the advantage of using put and delete as opposed to just get and post
Upvotes: 1