class: response
[24:14] (extern: com.lehman.aussom.AResponse) extends: object
The response class wraps a network response received by a page. Instances are obtained via page.navigate(), page.waitForResponse(), or from a request object via request.response().
Methods
-
url ()
Returns the URL of the response.
- @r
Astring URL.
- @r
-
status ()
Returns the HTTP status code of the response (e.g. 200, 404).
- @r
Anint HTTP status code.
- @r
-
statusText ()
Returns the HTTP status text of the response (e.g. 'OK', 'Not Found').
- @r
Astring status text.
- @r
-
headers ()
Returns the response headers as a map of header name to value strings.
- @r
Amap of string header names to string values.
- @r
-
ok ()
Returns whether the response was successful (status in range 200-299).
- @r
Abool - true if the response status is in the 2xx range.
- @r
-
text ()
Returns the response body as a string decoded as UTF-8.
- @r
Astring response body.
- @r
-
request ()
Returns the request that triggered this response.
- @r
Arequest object.
- @r