Skip to content

Commit

Permalink
fix(node): add request.bytes()
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Dec 4, 2024
1 parent 5faa6c7 commit 7f519ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/adapters/node/internal/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ export const NodeRequestProxy = /* @__PURE__ */ (() =>
return this._rawBody;
}

bytes(): Promise<Uint8Array> {
return this.arrayBuffer().then((r) => new Uint8Array(r));
}

blob(): Promise<Blob> {
if (!this._blobBody) {
this._blobBody = this.arrayBuffer().then((buff) => {
Expand Down

0 comments on commit 7f519ea

Please sign in to comment.