-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should no longer recommend form-data #179
Comments
ofc, NodeJS v20 just now got released so i think ppl should begin targeting v16 as LTS now. so then they can begin using node-fetch have now kind of become a older-supported-targeted solution |
Hey @jimmywarting,
Thanks for pointing this out 👍 ! I updated the outdated polyfill part of the readme.
Indeed, |
// Either mutate the global object…
global.fetch = fetch;
global.FormData = FormData;
|
Yes, this code snippet comes from the Closing the issue, feel free to reopen if I am missing something related to the original problem. |
even so i think globalThis should be used instead 😉
that's okey with me 👍 |
I just so happen to find this project when i read a reddit post
i saw this snipped and
node-fetch@3
no longer supports cjs and it have ditched support for the abnormalform-data
package for not follow the standard and not being iterable and working withBlob
s instead.instead you should recommend a spec'ed variant of formdata such as formdata-polyfill which
node-fetch
now also depends internally on and re-exports it... just b/c it needs handle decoding payloads back to formdata usingresponse.formData().then(fd => { ... })
so it should actually be:
The text was updated successfully, but these errors were encountered: