Check what a request answers
A check says what the answer must be, so that you see at once if something broke.
On this page
Add a check
Open the tab Checks of the request and press + Add a check. Choose what it looks at, and write what it must be.
| Check | What you write | It passes when |
|---|---|---|
| Status | 200, or 2xx for any from 200 to 299 | The status is that one |
| A value of the JSON | Its place, such as items[0].id, and the value | The value is exactly that one |
| A header | Its name and its value | The header has exactly that value |
| The body has a text | The text | The body has it, with the same capitals |
| Answers within (ms) | The milliseconds | The whole answer took that time or less |
Leave the value empty in A value of the JSON and in A header to check only that it is there.
A new request already has one check: its status must be 2xx.
Variables do not work in checks: write the value itself.
See the result
Send the request. The line of the answer says how many passed, for example 2 of 3 checks, and its tab Checks has each one with what was found.
A check that fails changes nothing in the request: it only tells you.
Check many requests
Run a folder or the whole collection to send its requests one after another and see which ones passed.