Conversation
|
Hi @xmduhan. Thank you for opening this PR. Could you help me understand the use case here? Could you instead use the |
|
Of course, you can specify the required proxy settings in the code, but this means that the code needs to be adjusted differently under different execution environments. As for the better solution, try not to modify my code, but set different execution variables in different execution environments. |
|
@xmduhan Thanks for clarifying. I'm inclined to minimize the API surface area of the client itself, delegating additional behavior to httpx. Reading through the docs, I'm surprised that httpx didn't automatically pick up those environment variables. You can accomplish this currently without changing the client by passing |
|
This may indeed be a problem with http. By default, it can automatically read http_proxy, but when you customize HTTPTransport, this feature will not take effect. I don’t know much about httpx, and I don’t know if this is a bug. , or there is another reason for this setting. |
I believe that if a user has configured a proxy, it should be ensured that the proxy is applied. It took me 5 hours to find the reason for the issue, and I hope this modification can save time for other users."