From 8a636d0600dc7000d1e12b2fc4f4f46ecd70164a Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Thu, 23 May 2024 10:27:58 +1000 Subject: feat(ext/fetch): `Request.bytes()` and `Response.bytes()` (#23823) Closes #23790 --- ext/fetch/lib.deno_fetch.d.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext/fetch/lib.deno_fetch.d.ts') diff --git a/ext/fetch/lib.deno_fetch.d.ts b/ext/fetch/lib.deno_fetch.d.ts index 4eb303e68..c27313903 100644 --- a/ext/fetch/lib.deno_fetch.d.ts +++ b/ext/fetch/lib.deno_fetch.d.ts @@ -58,6 +58,10 @@ declare interface Body { * that resolves with a `Blob`. */ blob(): Promise; + /** Takes a `Response` stream and reads it to completion. It returns a promise + * that resolves with a `Uint8Array`. + */ + bytes(): Promise; /** Takes a `Response` stream and reads it to completion. It returns a promise * that resolves with a `FormData` object. */ -- cgit v1.2.3