Skip to main content

waitForResponse

Waits for a particular network response to be made back to the browser

Example:

mutation WaitForResponse {
goto(url: "https://browserless.io") {
status
}

waitForResponse(codes: [200]) {
time
}
}
waitForResponse(
codes: [Int]
statuses: [Int]
url: String
): WaitForResponse

Arguments

waitForResponse.codes ● [Int] deprecated list scalar

DEPRECATED

Use statuses field instead as it is more consistent in BrowserQL.

The HTTP Response code(s) of the URL to wait for. Can be a single HTTP code or a list of desired codes

waitForResponse.statuses ● [Int] list scalar

The HTTP Response code(s) of the URL to wait for. Can be a single HTTP code or a list of desired codes

waitForResponse.url ● String scalar

The pattern of the response URL to wait for, using glob-style pattern-matching

Type

WaitForResponse object

Response returned after a particular network response has been received