Skip to content

4.4Headers

Type: header.<Name>, such as header.Content-Type. Checks: the value of one response header. A header is a named line of extra information sent with the response. In the dashboard, choose header and type the name in the header name box.

  • Upper and lower case in the header name do not matter. In the value, they do.
  • A missing header reads as empty text.
  • If you type a value but no name, the dashboard shows Enter the header name.

Operators: eq, neq, contains, matches. Use gt and lt for headers that hold a number, such as Content-Length or Age.

TypeOperatorValueWhat it means
header.Content-Typecontainsapplication/jsonThe API responds with JSON.
header.Cache-Controlcontainsmax-ageBrowsers may store the page for a while.
header.X-Versionmatches^2\.A custom header reports version 2.

When it fails: assertion header.Content-Type contains "application/json": got "text/html". Long values are cut to 40 characters.

Last updated