I have a question that still i have been using PUT and Delete in Web service (REST API) methods for respectively Update a resource and Delete a resource but i am informed now by mobile developers that its not good and always use POST method of HTTP to update and delete. Can i know how far is it true according to current world of technology ?
This is how i used.
Create -> Post
Read -> Get
Update -> Put
Delete -> Delete
Suggest me the best API documentation that is available online with best practices.
I think the problem is mostly related to some browsers or JavaScript frameworks not properly passing DELETE
and PUT
on Ajax calls.
There's an overview of the --more or less-- current state for DELETE
here:
Are the PUT, DELETE, HEAD, etc methods available in most web browsers?
and here (marked duplicate, but some different answers):
Which browsers don't support a HTTP DELETE with jQuery.ajax?
No mention of mobile browsers in particular, though.
A lot of frameworks use a hidden input in a post request to tell the server what rest method it "really" is. Like this:
<input type="hidden" name="_METHOD" value="PUT"/>