Navigation
See how pages expose Response objects from navigation methods
Overview
Response mirrors Playwright’s Response interface and is returned from Stagehand navigation helpers such as page.goto(), page.reload(), page.goBack(), and page.goForward(). It provides a convenient way to inspect the HTTP metadata associated with a navigation, retrieve the response body on demand, and monitor when the underlying request finishes.
Stagehand automatically returns null for navigations that do not yield a network request (for example data: URLs, about:blank, or same-document history changes), matching Playwright’s behaviour.
Getting a Response
null, allowing you to branch early:
Status & Metadata
url()
status()
statusText()
OK).
ok()
true for 2xx responses and false otherwise.
frame()
Frame that initiated the navigation. When the frame is no longer available, null is returned.
fromServiceWorker()
securityDetails()
null for insecure or non-network responses.
serverAddr()
Header Helpers
headers()
headers() behaviour.
allHeaders()
responseReceivedExtraInfo event (such as set-cookie).
headerValue()
null when the header is absent.
headerValues()
headersArray()
Body Helpers
body()
text()
json()
All body helper calls (
body(), text(), json()) only succeed once the browser reports the response body is available. Stagehand handles this timing automatically.Completion
finished()
null when the main navigation request completes successfully, or to an Error if Chrome reports Network.loadingFailed. This mirrors Playwright’s response.finished() contract and is especially helpful for catching late failures such as network resets or blocked responses.
Usage Patterns
Inspect status and headers
Handle non-network navigations
Await completion
Returned From
await page.goto(url, options?)await page.reload(options?)await page.goBack(options?)await page.goForward(options?)
Response | null depending on whether Chrome reported a document-level network response.
See Also
- Page reference for details on navigation helpers

