data: and about:, same-document navigations, and history operations with no matching entry can complete without a network response.
Stagehand retrieves response bodies and complete metadata lazily. Use the response while its Stagehand session is open. Response handles become invalid when the session closes, and the runtime may collect older handles after enough newer responses arrive.
- TypeScript
- Python
- Go
Navigation
Response | null, rather than returning the Page. The page’s internal reference and page.url() are still updated before the method resolves. If you do not need the response, continue to ignore the return value:Immediate metadata
These methods read metadata included with the navigation result and do not make another RPC call:ok() is true for status codes from 200 through 299. headers() returns normalized headers with lowercase names and returns a new object on every call.Headers and connection metadata
headerValue() joins duplicate values with , , while headerValues() keeps them separate. headersArray() preserves order, casing, and duplicates. allHeaders() includes extra-info headers, such as set-cookie, when Chrome provides them.Body and completion
json() preserves JSON parse errors. finished() resolves to null after success or an Error describing the loading failure.
