-
Notifications
You must be signed in to change notification settings - Fork 316
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
Replace Axios with Fetch #241
Comments
After building with |
@johansten Go for it! |
I'd suggest avoiding pulling in any polyfills if possible. sokra sums up my thoughts on it here, it leads to redundant code for library consumers, and |
@vcarl I think we can pull it out in a later, breaking change update, but for now I'd like to preserve compatibility between releases as much as possible. |
For sure, that makes sense. |
I ended up removing an |
Just so you know, I have a PR in that might make it to next week's release that uses Axios infrastructure: If you're still planning to pursue a fix to this, you'll need to take into account this feature. |
@morleyzhi Edit: Yeah, maybe not. I'll put this on hold. Keep-alive would have been awesome though ¯\_(ツ)_/¯ |
@johansten ah shoot, your idea seemed like a great change! Is adding replacements for those axios features on top of |
It doesn't look very complicated.. I'll just replace HorizonAxiosClient with the same functionality implemented using Fetch instead. One issue might be that proper timeouts w/ Fetch needs something called an |
Axios browserified doesn't support setting 'keep-alive' (the
httpsAgent
needed is just a stub), so every new server connection will do SSL negotiation, adding quite some time (~0.25s perhaps) to the response time.isomorphic-fetch
comes with node and browser support, with polyfills for older browsers.I can do the PR, just want a go/no-go
The text was updated successfully, but these errors were encountered: