Your progress is saved locally. to save it permanently.

0 of 2 steps0%

The status code is the cheapest, highest-value check you can make. Start here.

1

Assert the Right Status Code for Each Method

The status code is the API's one-word summary of what happened — if it's wrong, nothing below it matters. But a blanket "expect 200" is a trap: a create should return 201, an update returns 200, a delete often returns 204, and a fetch returns 200. Asserting 200 everywhere hides an endpoint that silently fails while still looking green. By the end of this step, every request should carry its own status-code test.

Open your Movies API collection. Agent Mode should still be open in the right sidebar from the previous step — if not, reopen it. Run a prompt like:

For each request in my Movies API collection, add a post-response test that checks the status code matches the operation: GET requests expect 200, the POST expects 201, the PUT expects 200, and the DELETE expects 200 or 204. Do not use one blanket 200 check for everything.

Review the scripts Agent Mode proposes and confirm the POST and DELETE got different codes than the GETs, then approve.

See it for yourself: Open GET /movies/animation, click Send, then open the Test Results tab in the response pane — your status-code test should show a green PASSED.

2

Check the Content-Type Header

A 200 OK means the request succeeded, not that you got something usable — a misconfigured server can return 200 with an HTML error page. Asserting Content-Type: application/json confirms the response is the kind of thing your code is about to parse.

In Agent Mode, run a prompt like:

Add a post-response test to every GET request that asserts the Content-Type response header includes "application/json".

When you review it, check that it uses "includes" rather than an exact match — servers often append ; charset=utf-8, and an exact-match test would fail on a valid response.

See it for yourself: Send a GET request and open the Test Results tab — the Content-Type test should show a green PASSED.