Question 5 of 10Pro Only
How do you validate an API response to ensure it is correct, including status code, body, headers, and response time?
Sample answer preview
Validating an API response involves checking multiple aspects of the response to ensure the API behaves correctly. A thorough validation goes beyond just checking if the request did not error out. Here is a systematic approach to validating each component of an API response.
response validationstatus codeJSON Schemaheadersresponse timeerror messages