mswjs / http-middleware

Spawn an HTTP server from your request handlers or apply them to an existing server using a middleware.
https://npm.im/@mswjs/http-middleware
107 stars 13 forks source link

TypeError: Failed to parse body as FormData #47

Open ernestostifano opened 3 months ago

ernestostifano commented 3 months ago

It is not possible to send a request using multipart/form-data. In other words, requests containing a FormData instance will fail if using the http-middleware, throwing the following error:

TypeError: Failed to parse body as FormData.
ernestostifano commented 3 months ago

Cross-referencing PR with a potential solution: https://github.com/mswjs/http-middleware/pull/39