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

support a callback for creating the connection #9

Open
slingamn opened this issue Feb 1, 2022 · 0 comments
Open

support a callback for creating the connection #9

slingamn opened this issue Feb 1, 2022 · 0 comments

Comments

@slingamn
Copy link
Owner

slingamn commented Feb 1, 2022

Right now, _prepare_request initializes (but doesn't connect) either a HTTPConnection, an HTTPSConnection, or an UnixHTTPConnection depending on the URL and other parameters. If we added a optional callback arg that could construct the connection, we could potentially support a number of tricky use cases (similar to the "adapter" functionality in Requests): SO_REUSEPORT, SOCKS proxies, and others.

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

1 participant