Bug Description
Getting the following error:
Promise {
<rejected> NotSupportedError: multipart/form-data not supported
at Request.formData (node:internal/deps/undici/undici:2311:19)
Reproducible By
const formData = new FormData()
formData.append('username', 'john.maverick')
const req = new Request('http://localhost', {
method: 'POST',
body: formData,
})
console.log(req.formData())
This example uses Node.js globals for Fetch API so I'm not importing any polyfills for neither Request nor FormData.
Expected Behavior
Calling request.formData() must return a Promise that resolves to a FormData instance containing the fields initially supplied to the Request constructor.
Logs & Screenshots
Environment
Additional context
I've skimmed Undici's source and couldn't find this NotSupportedError instance. I suspect this was indeed unsupported in the past but has been implemented in the newer versions of Node? I'd like to know when this was added, if ever. Thanks.
Bug Description
Getting the following error:
Reproducible By
This example uses Node.js globals for Fetch API so I'm not importing any polyfills for neither
RequestnorFormData.Expected Behavior
Calling
request.formData()must return a Promise that resolves to aFormDatainstance containing the fields initially supplied to theRequestconstructor.Logs & Screenshots
Environment
Additional context
I've skimmed Undici's source and couldn't find this
NotSupportedErrorinstance. I suspect this was indeed unsupported in the past but has been implemented in the newer versions of Node? I'd like to know when this was added, if ever. Thanks.