Client Methods In Rest API

Put Request
1)If you strict to the Arcticture and you want to perform the update methods with out passing the function name in the end point then it will automatically invoke the Put method
2)If you want to update a item withe item id then Put is the Perfect approch
3)in Put request we have to pass the data as a body object and in Id as a query parameter
4)PUT is used to replace a resource, if that resource is exist then simply update it, but if that resource doesn't exist then create it
5)using PUT we will provide the resource identifier

Post Request
1)A HTTP.POST method always creates a new resource on the server. Its a non-idempotent request i.e. if user hits same requests 2 times it would create another new resource if there is no constraint.
2)Here you are posting the resqust with body object
3)Post is used to create a resource and the returns the resource
4)POST will return the new resource identifier

Patch
A HTTP.PATCH method is used for partial modifications to a resource i.e. delta updates

Comments

Popular posts from this blog

My Interview Experience

React Checkbox Control SPFx