feat(ext/fetch): Request.bytes() and Response.bytes() (#23823)

Closes #23790
This commit is contained in:
Asher Gomez 2024-05-23 10:27:58 +10:00 committed by GitHub
parent f5d0c4b1ea
commit 8a636d0600
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 75 additions and 48 deletions

View file

@ -58,6 +58,10 @@ declare interface Body {
* that resolves with a `Blob`.
*/
blob(): Promise<Blob>;
/** Takes a `Response` stream and reads it to completion. It returns a promise
* that resolves with a `Uint8Array`.
*/
bytes(): Promise<Uint8Array>;
/** Takes a `Response` stream and reads it to completion. It returns a promise
* that resolves with a `FormData` object.
*/