Friday, 12 April 2019

What is the difference between PUT and POST method? REST API interview questions? Most asked RestAPI Automation Interview questions?



PUT vs POST : An Example

Letโ€™s list down when to use POST and when to use PUT :

GET     /user-management/users: Get all users
POST     /user-management/users: Create a new user

GET     /user-management/users/{id} : Get the user information identified by "id"
PUT     /user-management/users/{id} : Update the user information identified by "id"


It is good practice to use:

 - PUT for UPDATE operations.
 - POST for CREATE operations.

  • PUT is Idempotent 

All Time Popular Posts

Most Featured Post

Remove All Occurrences of a Given Character using Two Pointer Approach

  - ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„ ๐—ค&๐—” ๐—ฃ๐—ฎ๐—ฐ๐—ธ๐—ฎ๐—ด๐—ฒ ๐—ณ๐—ผ๐—ฟ ๐—ง๐—ฒ๐˜€๐˜ ๐—”๐˜‚๐˜๐—ผ๐—บ๐—ฎ๐˜๐—ถ๐—ผ๐—ป & ๐—ฆ๐——๐—˜๐—ง: https://topmate.io/sidharth_shukla/6053...