From 7f519eaf0ab6436a443c1bdd5e5ec75e0355527a Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Wed, 4 Dec 2024 01:29:45 +0100 Subject: [PATCH] fix(node): add `request.bytes()` --- src/adapters/node/internal/request.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/adapters/node/internal/request.ts b/src/adapters/node/internal/request.ts index 4722e6af..59469c15 100644 --- a/src/adapters/node/internal/request.ts +++ b/src/adapters/node/internal/request.ts @@ -130,6 +130,10 @@ export const NodeRequestProxy = /* @__PURE__ */ (() => return this._rawBody; } + bytes(): Promise { + return this.arrayBuffer().then((r) => new Uint8Array(r)); + } + blob(): Promise { if (!this._blobBody) { this._blobBody = this.arrayBuffer().then((buff) => {