Skip to content
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 reqwest with hyper #19

Open
flaki opened this issue Jun 20, 2021 · 1 comment
Open

Replace reqwest with hyper #19

flaki opened this issue Jun 20, 2021 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@flaki
Copy link
Contributor

flaki commented Jun 20, 2021

Currently we are installing reqwest solely to talk to the Strapi backend, while also needing hyper for hosting the bot API server. After the recent dependency update, we are also explicitly relying on hyper-tls to talk to the Matrix servers via Ruma over https.

Since hyper should provide similar client functionality to reqwest, could we just replace the reqwest dependency with it and rewrite the Strapi module, @badboy ?

I looked into this yesterday because reqwest was pulling in a pre-1.x version of tokio, but felt way over my paygrade, and the reqwest package bump solved the issue, updating to a fully 1.x tokio stack, but it would still be useful to get rid of a (redundant) dependency if we could.

Fwiw I'm happy to look into this and give this a go if there is no particular show-stoppers why I shouldn't. :)

@flaki flaki added enhancement New feature or request question Further information is requested labels Jun 20, 2021
@badboy
Copy link
Collaborator

badboy commented Jun 21, 2021

Why? reqwest makes it very convenient to do HTTP requests. It's really the nice API on top of hyper that you want anyway, and removing that just makes you write all this code yourself (well, maybe "less code" but I still wouldn't bother)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants