Skip to content

Commit 59d3240

Browse files
feat: allow form data through default body serializer
1 parent 69f0628 commit 59d3240

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/openapi-fetch/src/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,9 @@ export function defaultPathSerializer(pathname, pathParams) {
434434
* @type {import("./index.js").defaultBodySerializer}
435435
*/
436436
export function defaultBodySerializer(body) {
437+
if (body instanceof FormData) {
438+
return body
439+
}
437440
return JSON.stringify(body);
438441
}
439442

0 commit comments

Comments
 (0)