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

Save and re-use reqwest instance #33

Open
option-greek opened this issue Jan 10, 2022 · 2 comments
Open

Save and re-use reqwest instance #33

option-greek opened this issue Jan 10, 2022 · 2 comments

Comments

@option-greek
Copy link

option-greek commented Jan 10, 2022

Currently the reqwest client seem to be created always for executing a query:

let mut req = Client::new().request(self.method.clone(), &self.url);

This will end up doing a SSL handshake every time. It's better to create it once and reuse it to improve performance.

@option-greek option-greek changed the title Save and re-use request instance Save and re-use reqwest instance Jan 10, 2022
@spencerbart
Copy link
Contributor

Has this been resolved?

@soedirgo
Copy link
Collaborator

Nope - PRs welcome though!

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

No branches or pull requests

3 participants