-
Notifications
You must be signed in to change notification settings - Fork 56
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
Move from axios to undici as http client #2488
Comments
@nazarkulyk That is an interesting idea, thank you for the suggestion. We will talk about it. Can you specify what this would make better for you? Do you have any issues with the current implementation, that you hope to improve with that? |
@marikaner undici is developed directly by nodejs dev team. Undici implements standard API, that means you can easy switch this layer to any standard one, specially if you want to go to other platforms. Undici gives you more performance and better HTTP protocol support. |
@marikaner when you have a look keep the boundary condition in mind, that we need to configure proxies which we currently do by handing in the httpProxyAgent instead of the normal httpAgent from node. Same is true for all the trust related certificate things. So these two things need to be supported. |
First google hit suggests that you can also pass a custom agent in node fetch. So this should be fine. I would prefer native support though, since our current agent is not so active with support. We have a issue with proxy and client side certificate authentication which was not working and not fixed |
I think that undici is still better choice than node-fetch anyway... 🍡 |
I would also support this idea, as axios makes problems when using formData (2450). |
@nazarkulyk @nocin Thank you for this suggestion. I created a low priority issue in our backlog to consider such a change in one of our future major version releases. It is not likely that this will happen soon and I currently don't see a good reason to switch. |
Currently axios is used as http client abstraction layer.
Much better, standard way would be to use request or fetch way to work over http layer.
Some standards like
https://fetch.spec.whatwg.org/
and
https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
So, maybe simple move from axios to uncidi would be good alternative.
https://www.npmjs.com/package/undici
https://undici.nodejs.org/#/
The text was updated successfully, but these errors were encountered: