Get response headers.
Get the raw Response object.
Get the response status code.
Assert response status is 400 Bad Request.
Assert response status is 201 Created.
Assert response status is 403 Forbidden.
Assert response has the given header.
Optionalexpected: stringAssert response does not have the given header.
Assert JSON response contains the given data.
Assert JSON response has value at the given path.
Dot-notation path (e.g., 'data.user.id')
Expected value at path
Assert string value at path contains a substring.
Dot-notation path (e.g., 'data.message')
Substring to search for
Assert array length at path equals the expected count.
Dot-notation path (e.g., 'data.items')
Expected array length
Assert a JSON path exists (value can be anything, including null).
Dot-notation path (e.g., 'data.user.id')
Assert array value at path includes a specific item.
Dot-notation path (e.g., 'data.tags')
Item to search for in the array
Assert JSON value at path matches a custom predicate.
Dot-notation path (e.g., 'data.items')
Predicate function to validate the value
Assert a JSON path does not exist.
Dot-notation path (e.g., 'data.user.deletedAt')
Assert multiple JSON paths at once (batch assertion).
Object mapping paths to expected values
Assert JSON response structure matches the given schema.
Assert response status is 204 No Content.
Assert response status is 404 Not Found.
Assert response status is 200 OK.
Assert response status is 500 Internal Server Error.
Assert response has the given status code.
Assert response status is in the 2xx success range.
Assert response status is 401 Unauthorized.
Assert response status is 422 Unprocessable Entity.
Get the response body as text.
TestResponse
Wrapper around Response with assertion methods.
Example