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

3 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 class overview

APIResponse class represents responses returned by APIRequestContext.get and similar methods. Available since v1.16.

APIResponse usage example with sync context

Example of using APIResponse with sync_playwright: from playwright.sync_api import sync_playwright with sync_playwright() as p: context = playwright.request.new_context() response = context.get("https://example.com/user/repos") assert response.ok assert response.status == 200 assert response.headers["content-type"] == "application/json; charset=utf-8" assert response.json()["name"] == "foobar" assert response.body() == '{"status": "ok"}'

Response class overview

Response class represents responses which are received by page. It has been available since v1.8.

Give your agent this brain