Bug Description
I'm trying to construct a Request with a FormData body, using the global Request in Node.js v24 (which seems to be Undici 7.10.0), but a FormData imported from Undici 5.28.5.
Reproducible By
import { FormData } from 'undici';
const r = new Request('https://example.com', {
body: new FormData(),
method: 'POST',
});
console.log(r.headers.get('content-type'));
This outputs multipart/form-data in Node.js 20 & 22, but text/plain in Node.js 24
Additional context
This may well be expected behaviour! However, if it is I would've expected to see some documention mentioning that Undici 5 isn't supported in Node.js 24+.
Bug Description
I'm trying to construct a
Requestwith aFormDatabody, using the globalRequestin Node.js v24 (which seems to be Undici 7.10.0), but aFormDataimported from Undici 5.28.5.Reproducible By
This outputs
multipart/form-datain Node.js 20 & 22, buttext/plainin Node.js 24Additional context
This may well be expected behaviour! However, if it is I would've expected to see some documention mentioning that Undici 5 isn't supported in Node.js 24+.