You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Do we have any plan to add proxy IP for a single request ? #1194
There are no similar issues or pull requests for this yet.
I discussed this idea on the community chat and feedback is positive.
Is your feature related to a problem? Please describe.
For the network data collection related jobs, sometimes, a single proxy IP may be invalid after making several requests. In this case, use a single proxy IP for each request, rather than use a Client instance maybe more appropriate. I know, we can set a proxy IP when create a Client(or AsyncClient) instance, while if the proxy ip used in Client instance become unavailable after several requests, we may need to create another Client instance, I'm not sure if say it like this is correct :-( .
Describe the solution you would like.
Do we have any plan to enable httpx.request(...) has a proxies arg, just like requests do ?
Well true, Requests supports passing proxies on the high level API, so we might want to consider this as well. Not costly in terms of implementation, since it's mostly an extra argument to forward to the underlying client constructor.
Yup, we'd need to be clear that we're not supporting client.request(..., proxies=...), but I don't see any reason why we shouldn't support it in the top-level helper functions, httpx.request & pals.
Activity
florimondmanca commentedon Aug 18, 2020
Hi,
Well true, Requests supports passing
proxieson the high level API, so we might want to consider this as well. Not costly in terms of implementation, since it's mostly an extra argument to forward to the underlying client constructor.https://requests.readthedocs.io/en/master/user/advanced/#proxies
lovelydinosaur commentedon Aug 18, 2020
Yup, we'd need to be clear that we're not supporting
client.request(..., proxies=...), but I don't see any reason why we shouldn't support it in the top-level helper functions,httpx.request& pals.Iflier commentedon Aug 18, 2020
Okey, I got it. Thanks for your clarification 👍 . @florimondmanca @tomchristie