Docs
API 1.39
Status
Conditions

network

The `network` condition.

True when a response matching url, and method and status if given, has been observed since the step started.

Type: object

#Keys

KeyTypeDescription
network.jsonstringA JSONPath into the response body. The schema accepts and validates it (lint E009); the match itself is decided by url, method and status.
network.methodstringThe HTTP method the request must have, compared case-insensitively.
network.statusinteger or arrayThe response status, either one code such as 200 or an inclusive range such as [200, 299], each between 100 and 599.
network.urlstringA glob the response URL must match.

#Example

{
  "network": {
    "url": "**/api/offers*",
    "status": 200
  }
}

From the contract fixture network-locator, a program the test suite validates.

Was this page helpful?