File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,13 +10,14 @@ def main() -> None:
1010
1111 browser = client .browsers .create ()
1212
13- # Raw browser curl: streams the response. Use for large responses or when you want to stream.
13+ # Raw browser curl: streams the response. Use for large responses, when you want to stream,
14+ # or when you want httpx.Response semantics.
1415 response : httpx .Response = client .browsers .request (browser .session_id , "GET" , "https://example.com" )
1516 print ("status" , response .status_code )
1617
1718 # Buffered browser curl: returns the full response in a JSON envelope. Use for small responses.
1819 buffered = client .browsers .curl (browser .session_id , url = "https://example.com" , method = "GET" )
19- print ("buffered-status " , buffered .status )
20+ print ("body " , buffered .body )
2021
2122 client .browsers .delete_by_id (browser .session_id )
2223
You can’t perform that action at this time.
0 commit comments