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

parallelized http get/post request with trying best to reuse connections? #1044

Closed
bethebest0622 opened this issue Apr 11, 2024 · 1 comment

Comments

@bethebest0622
Copy link

bethebest0622 commented Apr 11, 2024

Is your feature request related to a problem?

I am very careful for latency.

so the best solution i come out with is:

I want to http request try best to reuse the previous connections.

parallelized handle the http get/post request with a pool and this parallelized request reuse previous connections so that can avoid rebuild the connection.

Is cpr can implement this?

Possible Solution

add some setting or config

@bethebest0622 bethebest0622 changed the title try best to reuse connections? parallelized http get/post request with trying best to reuse connections? Apr 11, 2024
@COM8
Copy link
Member

COM8 commented Apr 13, 2024

To reuse a connection, try using cpr::Session. More docs are available here: https://docs.libcpr.org/advanced-usage.html#session-objects

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

No branches or pull requests

2 participants