Skip to main content

waitForRequest

Waits for the browser to make a particular request

Example:

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

waitForRequest(method: GET) {
time
}
}
waitForRequest(
method: Method
timeout: Float
url: String
): WaitForRequest

Arguments

waitForRequest.method ● Method enum

The method of the request to wait for

waitForRequest.timeout ● Float scalar

How long to wait for the request to be made before timing out, overriding any defaults. Default timeout is 30 seconds, or 30000.

waitForRequest.url ● String scalar

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

Type

WaitForRequest object

Response returned after a particular network request has been sent