Skip to content

Commit 125c74d

Browse files
rgarciaclaude
andcommitted
docs: print response body and clarify fetch() / Response semantics
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 47e2462 commit 125c74d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/browser-routing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ async function main() {
66
const browser = await kernel.browsers.create({});
77

88
// Raw browser curl: streams the response. Use for large responses, when you want to stream,
9-
// or when you want Response semantics.
9+
// or when you want fetch() / Response semantics.
1010
const response: Response = await kernel.browsers.fetch(browser.session_id, 'https://example.com', { method: 'GET' });
11-
console.log('status', response.status);
11+
console.log('body', await response.text());
1212

1313
// Buffered browser curl: returns the full response in a JSON envelope. Use for small responses.
1414
const buffered = await kernel.browsers.curl(browser.session_id, { url: 'https://example.com', method: 'GET' });

0 commit comments

Comments
 (0)