HTTP methods are used to request information while working with APIs. For instance, think about interacting with a Spotify App , you would “SEARCH” your favorite album, “SELECT” a particular song in that album & then hit the “PLAY” button to listen to your favorite song. Here , you are using various methods to get your things done, HTTP methods works in a similar way.

HTTP methods can Create , Read , Update & Delete the information.
There are 4 most commonly used HTTP methods:

1. POST

  • It is used to Create new resources.
  • For instance, if we want to upload a new video using the YouTube API , we will use the POST method since it’s used to create new resources ( videos ).

2. GET

  • It is used to read/ retrieve a representation of a resource .
  • The response to this method helps to fetch the requested information.
  • It is used only to retrieve the data and not used to modify or update the same. It is considered safe.
  • For example , at Netflix , GET method can be used to retrieve the list of horror movies.

3. PUT

  • It is used to update /replace the data.
  • For example, Using the PUT method in Amazon API to update the the delivery address.

3. DELETE

  • It is used to delete/remove data.
  • For example, Using the DELETE method in the Gmail API to delete the email.

Thanks for reading! If you’ve got ideas to contribute to this conversation please comment. If you like what you read and want to see more, clap me some love! Follow here, or connect with me on Linkedin.

Product Manager @AngelOne, ex-@Flipkart, @Cleartrip. Interests: Product, Technology, Strategy, Startups, Fintech & E-commerce!