There are different Methods used during API Design and development.
Some of the important methods are:
GET method is used to fetch some resources from the server. GET APIs are said to be idempotent, which means, in case of multiple calls, they will return the same result every time, unless and until they have been modified using an another way, either a POST or PUT API call or in case of any backend data update.
POST method is used to create a new resource in the server. POST APIs are not idempotent. In such APIs, usually additional information is passed to the server in API payload (body) and/or in API headers.
PUT method is used when we want to modify an existing resource in the server.
PATCH method is used when we want to selectively modify any attribute of an existing resource in the server. As the name suggest, it used for partial updates in a resource.
DELETE method is used when we want to delete an existing resource from the server. DELETE APIs are idempotent.
If you liked this tutorial, consider sharing among your networks.
Fully customizable CRM Software for Freelancers and Small Businesses