0
0
Postmantesting~10 mins

Why HTTP methods define API intent in Postman - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the HTTP method for a GET request in Postman.

Postman
pm.request.method = '[1]';
Drag options to blanks, or click blank then click option'
AGET
BPOST
CPUT
DDELETE
Attempts:
3 left
💡 Hint
Common Mistakes
Using POST instead of GET for retrieving data.
2fill in blank
medium

Complete the code to set the HTTP method for creating a resource in Postman.

Postman
pm.request.method = '[1]';
Drag options to blanks, or click blank then click option'
AGET
BDELETE
CPATCH
DPOST
Attempts:
3 left
💡 Hint
Common Mistakes
Using GET instead of POST when creating resources.
3fill in blank
hard

Fix the error in the code to set the HTTP method for updating a resource in Postman.

Postman
pm.request.method = '[1]';
Drag options to blanks, or click blank then click option'
APOST
BPUT
CGET
DDELETE
Attempts:
3 left
💡 Hint
Common Mistakes
Using POST instead of PUT for updating resources.
4fill in blank
hard

Fill both blanks to set the HTTP method and add a description for deleting a resource in Postman.

Postman
pm.request.method = '[1]';
pm.request.description = '[2]';
Drag options to blanks, or click blank then click option'
ADELETE
BRemove the resource
CUpdate the resource
DCreate a new resource
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong HTTP method or description that does not match the method.
5fill in blank
hard

Fill all three blanks to set the HTTP method, add a header, and set the request body for a PATCH request in Postman.

Postman
pm.request.method = '[1]';
pm.request.headers.add({key: '[2]', value: 'application/json'});
pm.request.body.raw = '[3]';
Drag options to blanks, or click blank then click option'
APATCH
BContent-Type
C{"name": "New Name"}
DAuthorization
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong HTTP method, missing or wrong header, or invalid JSON body.