Complete the code to set the HTTP method for a GET request in Postman.
pm.request.method = '[1]';
The GET method is used to retrieve data from the server. Setting pm.request.method = 'GET' tells Postman to make a GET request.
Complete the code to set the HTTP method for creating a resource in Postman.
pm.request.method = '[1]';
The POST method is used to create new resources on the server. Setting pm.request.method = 'POST' tells Postman to send data to create something new.
Fix the error in the code to set the HTTP method for updating a resource in Postman.
pm.request.method = '[1]';
The PUT method is used to update or replace a resource. Setting pm.request.method = 'PUT' correctly defines the intent to update.
Fill both blanks to set the HTTP method and add a description for deleting a resource in Postman.
pm.request.method = '[1]'; pm.request.description = '[2]';
DELETE method is used to remove a resource. The description helps explain the intent clearly.
Fill all three blanks to set the HTTP method, add a header, and set the request body for a PATCH request in Postman.
pm.request.method = '[1]'; pm.request.headers.add({key: '[2]', value: 'application/json'}); pm.request.body.raw = '[3]';
PATCH method updates part of a resource. Setting the 'Content-Type' header to 'application/json' tells the server the data format. The body contains the JSON with the update.