Skip to content

Undici v7(+?) Request cannot parse FormData from Undici v5 #4285

Description

@penalosa

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+.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions