File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,11 +7,16 @@ async function main() {
77
88 // Raw browser curl: streams the response. Use for large responses, when you want to stream,
99 // or when you want fetch() / Response semantics.
10- const response : Response = await kernel . browsers . fetch ( browser . session_id , 'https://example.com' , { method : 'GET' } ) ;
10+ const response : Response = await kernel . browsers . fetch ( browser . session_id , 'https://example.com' , {
11+ method : 'GET' ,
12+ } ) ;
1113 console . log ( 'body' , await response . text ( ) ) ;
1214
1315 // Buffered browser curl: returns the full response in a JSON envelope. Use for small responses.
14- const buffered = await kernel . browsers . curl ( browser . session_id , { url : 'https://example.com' , method : 'GET' } ) ;
16+ const buffered = await kernel . browsers . curl ( browser . session_id , {
17+ url : 'https://example.com' ,
18+ method : 'GET' ,
19+ } ) ;
1520 console . log ( 'body' , buffered . body ) ;
1621
1722 await kernel . browsers . deleteByID ( browser . session_id ) ;
You can’t perform that action at this time.
0 commit comments