We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Response.bytes
FormData
1 parent f38dd03 commit 3757072Copy full SHA for 3757072
src/utils/body.ts
@@ -92,9 +92,12 @@ export function readRawBody<E extends Encoding = "utf8">(
92
}
93
// TODO: Handle other BodyInit types
94
// https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#body
95
- if (_resolved instanceof URLSearchParams || _resolved instanceof FormData) {
+ if (_resolved instanceof URLSearchParams) {
96
return Buffer.from(_resolved.toString());
97
98
+ if(_resolved instanceof FormData) {
99
+ return new Response(_resolved).bytes();
100
+ }
101
return Buffer.from(_resolved);
102
});
103
return encoding
0 commit comments