class: request
[23:14] (extern: com.lehman.aussom.ARequest) extends: object
The request class wraps a network request made by a page. Instances are obtained via page.waitForRequest() or network event handlers.
Methods
-
url ()
Returns the URL of the network request.
- @r
Astring URL.
- @r
-
method ()
Returns the HTTP method of the request (e.g. 'GET', 'POST').
- @r
Astring HTTP method.
- @r
-
headers ()
Returns the request headers as a map of header name to value strings.
- @r
Amap of string header names to string values.
- @r
-
postData ()
Returns the request body (POST data) as a string, or an empty string if the request has no body.
- @r
Astring request body.
- @r
-
resourceType ()
Returns the resource type of the request such as 'document', 'stylesheet', 'image', 'script', 'font', 'xhr', 'fetch', or 'websocket'.
- @r
Astring resource type.
- @r
-
isNavigationRequest ()
Returns whether this is a navigation request (i.e. a request for a document that results in page navigation).
- @r
Abool - true if this is a navigation request.
- @r
-
response ()
Returns the response that was received for this request, or null if the request has not yet completed or failed.
- @r
Aresponse object or null.
- @r