-
-
Notifications
You must be signed in to change notification settings - Fork 829
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
Add HTTPTransport
and AsyncHTTPTransport
#1399
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Is it expecting that keepalive changes are also in here, though?
@florimondmanca Okay, so... I've gone for explicit arguments throughout. (Maxim of: Of two otherwise equally valid design options, choose the more constrained) Note that it highlights the fact that I've also added the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, this is looking neat. 👍
This is an exciting addition - any idea when it will be released? |
Closes #1302
Two points to note here...
httpx.ProxyTransport()
/httpx.AsyncProxyTransport()
classes.proxy
argument to the existing class. Switch whichhttpcore
instance is used for._pool
depending on that argument.httpx.HTTPTransport(proxy=...)
,httpx.AsyncHTTPTransport(proxy=...)
. I think I quite like the way that'd have a lower footprint.kwargs
for the advanced options. I'm kinda thinking to switch these out to nameduds
,local_address
, etc... options instead, althoughkwargs
does at least have the benefit of allowing us to add options tohttpcore
and have them be exposed without any changes inhttpx
.