Environment var HTTP_PROXY is not respected when HTTPTransport is passed as argument #2593
Unanswered
tscheburaschka
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are using httpx as the basic HTTP-client in a library of custom API connectors.
We would like to configure the number of retries and the only way we found was to pass a
httpx.HTTPTransport
object to the instantiation ofhttpx.Client
. However, this unexpectedly stopped the client from respecting the environment variable HTTP_PROXY.If this is intended behavior, it would benefit from explicit documentation.
However, I would expect the env vars still to work, even when a transport is passed.
nb: AFAIK, the critical lines are here https://github.com/encode/httpx/blob/master/httpx/_client.py#L669
Beta Was this translation helpful? Give feedback.
All reactions