Skip to content

Commit cb86142

Browse files
chore(docs): improve docs for withResponse/asResponse (#13)
1 parent 109b57f commit cb86142

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ const response = await client.workbooks.query(
156156
### Accessing raw Response data (e.g., headers)
157157

158158
The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
159+
This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.
159160

160161
You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
162+
Unlike `.asResponse()` this method consumes the body, returning once it is parsed.
161163

162164
<!-- prettier-ignore -->
163165
```ts

0 commit comments

Comments
 (0)