0
0
Postmantesting~10 mins

Defining mock responses in Postman - Interactive Code Practice

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

Complete the code to define a mock response status code.

Postman
{
  "status": [1]
}
Drag options to blanks, or click blank then click option'
A200
BOK
C404
D500
Attempts:
3 left
💡 Hint
Common Mistakes
Using status text like 'OK' instead of numeric code.
Using a wrong status code for success.
2fill in blank
medium

Complete the code to set the mock response body as JSON.

Postman
{
  "body": [1]
}
Drag options to blanks, or click blank then click option'
A["Success"]
B"Success"
CSuccess
D{"message": "Success"}
Attempts:
3 left
💡 Hint
Common Mistakes
Using plain text without quotes.
Using an array instead of an object.
3fill in blank
hard

Fix the error in the mock response header definition.

Postman
{
  "headers": {
    "Content-Type": [1]
  }
}
Drag options to blanks, or click blank then click option'
A"application/json"
Bapplication/json
C"text/html"
Dtext/html
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting quotes around header values.
Using wrong content type.
4fill in blank
hard

Fill both blanks to define a mock response with status and body.

Postman
{
  "status": [1],
  "body": [2]
}
Drag options to blanks, or click blank then click option'
A201
B"Created"
C{"result": "Created"}
D200
Attempts:
3 left
💡 Hint
Common Mistakes
Using plain text for body instead of JSON string.
Using wrong status code for creation.
5fill in blank
hard

Fill all three blanks to define a full mock response with status, headers, and body.

Postman
{
  "status": [1],
  "headers": {
    "Content-Type": [2]
  },
  "body": [3]
}
Drag options to blanks, or click blank then click option'
A404
B"application/json"
C{"error": "Not Found"}
D200
Attempts:
3 left
💡 Hint
Common Mistakes
Using numeric or unquoted header values.
Using wrong status code for error.
Using plain text instead of JSON string for body.