We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent baf37e5 commit 0c9b276Copy full SHA for 0c9b276
1 file changed
src/utils/body.ts
@@ -96,12 +96,14 @@ export function readRawBody<E extends Encoding = "utf8">(
96
return Buffer.from(_resolved.toString());
97
}
98
if (_resolved instanceof FormData) {
99
- return new Response(_resolved).bytes();
+ return new Response(_resolved)
100
+ .bytes()
101
+ .then((uint8arr) => Buffer.from(uint8arr));
102
103
return Buffer.from(_resolved);
104
});
105
return encoding
- ? promise.then((buff) => buff.toString(encoding))
106
+ ? (promise.then((buff) => buff.toString(encoding)) as Promise<any>)
107
: (promise as Promise<any>);
108
109
0 commit comments