-
Notifications
You must be signed in to change notification settings - Fork 107
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
Support FormData
Node.js v18
#330
Comments
Worse, even: mailgun.js supports an older version of form-data apparently. Following issue to update my code when possible. |
I recommend that you switch out axios for a fetch api. either provided by node-fetch, undici or built in. that supports encoding a spec'ed FormData. You can later remove the dependency of them when the time comes when you only support nodejs v18+ |
Hi RemyMachado Here is a related issue in the Axios library that may be used for tracking: |
Why do you prefer a axios dependency over built in fetch that is supported in a variant different engines (web worker, node, deno, bun)? |
There are a few reasons:
Of course, they won't stop me if node 18 support in Axios takes too much time but in this particular case, I would rather wait some time. Axios will need to implement compatibility with node 18 anyway, and it seems there is a PR already that should fix the issue with form data. |
@olexandr-mazepa PR for axios/axios#5327 is merged now. |
Since Node.js v18,
FormData
is part of the native Node.js' API:Unfortunately mailgun.js doesn't support it yet. Furthermore the recommended form-data library is unmaintained and not a good alternative.
The text was updated successfully, but these errors were encountered: