DEV Community

Avinash DV
Avinash DV

Posted on

Type of API requests

This post will give a brief knowledge of type of requests available

GET
It is used to get the data from an API, which is later used to display on web site.

POST
This is used mostly when user fills a form on the website. The user data is sent to server with POST request to store the data in db.

PUT/PATCH
This request is used to update the existing data in database, like in the POST request we may have added user address, now the user have moved to other place and want to update the address.

DELETE
As the name suggests, we use it to delete the user or any information permanently. It is very dangerous and beware while using it.

Top comments (0)