Http Method

·

2 min read

It contains many methods.

  1. GET

  2. POST

  3. PATCH

  4. PUT

  5. DELETE

--> GET Method:- When we send a request to the server, this is a GET method.

Suppose you want to search live match score go to the url of the web browser and search cricbuzz then the request is forwarded to the server this process happens by the help of the GET method.

--> POST Method:- When we send any data to the server like when we log in to Facebook a form appears in front of us. simply you type username and password the data is sent to the server and is stored in the database this is done with the help of the POST method.

PUT Method:- PUT request when we upload an image on Facebook this is done with the help of the PUT method. suppose you want to upload a resume on the server this is done with the help of the PUT method. Any data that is uploaded on the server is done with the help of the PUT method.

PATCH Method:- Patch requests can be understood by this Suppose you change your dp from Facebook You can simply upload another image on Facebook, which means you can change an image that exists this is done with the help of the PATCH method.

DELETE Method:- when we use the delete method it will delete that object where you use the delete method. Suppose you want to delete your Facebook profile from Facebook then simply go to the delete button and press it behind the button it uses the DELETE method.

Any many other methods go to mdn docs.