QA Stacks

What are the Methods in API testing

Methods in API testing:

Ans: Get Method: When we want to fetch data from the server then we use GET method to fetch the data.

POST Method: When we want to create some new resource on the server then we use POST method.

PUT Method: When we want to update any existing resource then we use PUT method to modify. If parameter which we want to update is available then it modifies that parameter if that parameter is not available then it creates that parameter.

PATCH Method: When we want to do partially update then we use PATCH method to update. We pass only that parameter which we want to update, we don't have to pass complete payload to update the resource.