What is the difference between PUT and POST method in API?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dhanush KRank #1,037 · 1.9K reputationPosted May 1, 2022, 1:51 AM EDT
POST means "creating new".
Eg: If we want to add new entry into a datasource, we use POST method to post the data
PUT means "insert, replace/update if already exists"
Eg: If we want to update the existing data or to replace/modify the data, we use PUT method
Billy Venus37 reputationPosted May 1, 2022, 1:52 AM EDT
Anupam MaitiRank #295 · 8.5K reputationPosted May 2, 2022, 3:57 AM EDT
Best expanantion can be found here -
https://stackoverflow.com/questions/630453/what-is-the-difference-between-post-and-put-in-http