Replies: 1 comment
-
Kind-of, although there's a bit of a caveat... If you instantiate a single transport... t = httpx.HTTPTransport(...) Then you can pass the same transport to more than one client instance... c1 = httpx.Client(transport=t)
c2 = httpx.Client(transport=t) I think that'll just work as expected. Although note that as soon as one or the other client is closed, then the transport will be closed and no longer usable. (By either client.) It'd be interesting to compare if other Python HTTP clients allow for this functionality, and if so, what their patterns of usage look like here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to provide unique Authorization headers per AsyncClient, but would like to share a connection pool between each AsyncClient. Is this possible?
Beta Was this translation helpful? Give feedback.
All reactions