response
Returns response information, filtered by the provided arguments, made by the browser. You may optionally filter the returned results by a glob-like URL-pattern, the Method of the response or the Type of response. Applying an operator to this will then change the behavior by either "and"ing the filters together, or "or"ing them. This API will automatically wait for the response to be made if none is immediately found which you can turn off by disabling the "wait" option.
Getting all "Document" responses
mutation DocumentResponses{
goto(url: "https://example.com/", waitUntil: load) {
status
}
response(type:document) {
url
body
headers {
name
value
}
}
}
Load all "GET" AJAX Responses
mutation AJAXGetCalls {
goto(url: "https://msn.com/", waitUntil: load) {
status
}
response(type: xhr, method: GET, operator: and) {
url
type
method
body
headers {
name
value
}
}
}
response(
status: [Int]
method: [Method]
operator: OperatorTypes = or
timeout: Float
type: [ResourceType]
url: [String]
wait: Boolean = true
): [ResponseResponse]
Arguments
response.status
● [Int]
list scalar
The status codes response to return results for
response.method
● [Method]
list enum
The method of the response to return results for
response.operator
● OperatorTypes
enum
When applying arguments like URL or method, this operator will either "and" them together, or "or" them together. Default is "or"
response.timeout
● Float
scalar
How long to wait for the response(s) to be made before timing out, overriding any defaults. Default timeout is 30 seconds, or 30000. "wait" parameter must also be "true".
response.type
● [ResourceType]
list enum
The type content-type of the response to match against
response.url
● [String]
list scalar
The pattern of the response URL to wait for, using glob-style pattern-matching
response.wait
● Boolean
scalar
Whether or not to wait for the response to be received. When set to true
, generally only one response is returned since this API will wait for the first response that matches any patterns to be returned
Type
ResponseResponse
object
Response returned from the response API