Skip to content

Conversation

jaspervdm
Copy link
Contributor

@jaspervdm jaspervdm commented Sep 30, 2020

Right now our HTTP client that interfaces with the node and other wallets is using some pretty low level hyper code. It uses separate dependencies for tls and timeouts. On top of that, it uses a Tokio runtime that is spun up for every request separately, which is inefficient and tends to fail at some point (see #509).

This PR replaces the hyper code by the reqwest library, which is well reviewed and maintained and using it simplifies our code.

Instead of creating a tokio runtime for each request, use a global runtime. Unfortunately, until reqwest updates to tokio 0.3, the runtime will have to be behind a Mutex.

@quentinlesceller
Copy link
Member

This seems a great improvement 👍 .

Could use some help with testing the tor socks proxy, if anyone feels like it.

Sure ping me anytime!

@jaspervdm
Copy link
Contributor Author

For some reason the tests are failing on Windows, I will try to debug it on my machine after the weekend as I don't have access to it before then.

@quentinlesceller
Copy link
Member

Looks like a random error. I triggered another run.

@b-wg
Copy link

b-wg commented Nov 17, 2020

This seems good, any other issues with this PR? Can we merge it now?

@jaspervdm jaspervdm changed the base branch from master to current/5.0.x December 8, 2020 14:36
@jaspervdm jaspervdm changed the title [WIP] Replace custom hyper client with reqwest Replace custom hyper client with reqwest Dec 8, 2020
@jaspervdm jaspervdm changed the title Replace custom hyper client with reqwest [DNM] Replace custom hyper client with reqwest Dec 15, 2020
@quentinlesceller quentinlesceller changed the title [DNM] Replace custom hyper client with reqwest [DNM] [5.0.x] Replace custom hyper client with reqwest Mar 5, 2021
@phyro
Copy link
Member

phyro commented Mar 22, 2021

@quentinlesceller can we close this one?

@quentinlesceller
Copy link
Member

Yes indeed we can close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants