new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Playwright · API reference · all subjects

apiresponse/methods

23 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

APIResponse.dispose method

Async method that disposes the body of this response. If not called then the body will stay in memory until the context closes. Available since v1.16.

APIResponse.headersArray method

Returns an array with all the response HTTP headers associated with this response. Header names are not lower-cased. Headers with multiple entries, such as Set-Cookie, appear in the array multiple times. Returns type Array<Object> where each object has: name (string) - Name of the header, value (string) - Value of the header. Available since v1.16.

APIResponse.securityDetails method

Async method that returns SSL and other security information. Resolves to null for non-HTTPS responses. For redirected requests, returns the information for the last request in the redirect chain. Available since v1.61.

APIResponse.serverAddr method

Async method that returns the IP address and port of the server. Resolves to null if the server address is not available. For redirected requests, returns the information for the last request in the redirect chain. Available since v1.61.

APIResponse.timing method

Returns resource timing information for given response as a resource timing object. For redirected requests, returns the information for the last request in the redirect chain. When the response is served from the HAR file, timing information is not available and all values are -1. Information is based on Resource Timing API. Available since v1.62.

Response.finished method

async method Response.finished returns null or string (or Error in JavaScript). Waits for this response to finish, returns always null. Available since v1.8.

Response.frame method

method Response.frame returns Frame. Returns the Frame that initiated this response. Available since v1.8.

Response.allHeaders method

async method Response.allHeaders returns Object<string, string>. Returns an object with all the response HTTP headers associated with this response. Available since v1.15.

Response.body method

async method Response.body returns Buffer. Returns the buffer with response body. Available since v1.8.

Response.fromServiceWorker method

method Response.fromServiceWorker returns boolean. Indicates whether this Response was fulfilled by a Service Worker's Fetch Handler (via FetchEvent.respondWith). Available since v1.23.

Response.headers method

method Response.headers returns Object<string, string>. Returns an object with the response HTTP headers. The header names are lower-cased. This method does not return security-related headers, including cookie-related ones. Use Response.allHeaders for complete list of headers that include cookie information. Available since v1.8.

Response.headersArray method

async method Response.headersArray returns Array<Object>. Returns an array with all the request HTTP headers associated with this response. Header names are NOT lower-cased, unlike Response.headers. Headers with multiple entries such as Set-Cookie appear in the array multiple times. Each object in the array has name (string) and value (string) properties. Available since v1.15.

Response.headerValues method

async method Response.headerValues(name: string) returns Array<string>. Returns all values of the headers matching the name, for example set-cookie. The name is case-insensitive. Available since v1.15.

Response.httpVersion method

async method Response.httpVersion returns string. Returns the HTTP version used by the response. Available since v1.59.

Response.json method

async method Response.json returns Serializable (in JavaScript and Python) or null or JsonElement (in C#). Returns the JSON representation of response body. This method will throw if the response body is not parsable via JSON.parse. Available since v1.8.

Response.ok method

method Response.ok returns boolean. Contains a boolean stating whether the response was successful (status in the range 200-299) or not. Available since v1.8.

Response.request method

method Response.request returns Request. Returns the matching Request object. Available since v1.8.

Response.securityDetails method

async method Response.securityDetails. Returns SSL and other security information. Available since v1.13.

Response.serverAddr method

async method Response.serverAddr. Returns the IP address and port of the server. Available since v1.13.

Response.status method

method Response.status returns int. Contains the status code of the response (e.g., 200 for a success). Available since v1.8.

Response.statusText method

method Response.statusText returns string. Contains the status text of the response (e.g., usually an 'OK' for a success). Available since v1.8.

Response.text method

async method Response.text returns string. Returns the text representation of response body. Available since v1.8.

Response.url method

method Response.url returns string. Contains the URL of the response. Available since v1.8.

Give your agent this brain