Skip to content
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

Allow Aiohttp to use proxy #84

Closed
hotdog809 opened this issue Jun 1, 2022 · 2 comments
Closed

Allow Aiohttp to use proxy #84

hotdog809 opened this issue Jun 1, 2022 · 2 comments

Comments

@hotdog809
Copy link

We have to use a proxy within our organisation to connect to data.opensanctions.org. For most Lunix applications it suffices to set the environmental variables HTTP_PROXY and HTTPS_PROXY but Aiohttp requires the flag 'trust_env=True' to read from environmental variables; https://docs.aiohttp.org/en/stable/client_advanced.html - Proxy support.

For example:
async with aiohttp.ClientSession(trust_env=True) as session: async with session.get("http://python.org") as resp: print(resp.status)

Could this, or another way of specifying a proxy, be added to Yente?

pudo added a commit that referenced this issue Jun 1, 2022
@pudo
Copy link
Member

pudo commented Jun 1, 2022

This is now in main. Would you be able to validate it before I cut a release and close this issue?

@hotdog809
Copy link
Author

Yes, thanks! This works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants