We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I guess I have to configure it with aiohttp, but I don't see the option in aiosnow client module
The text was updated successfully, but these errors were encountered:
Currently, you'll need to use a custom aiohttp.ClientSession. Something like this should work:
aiohttp.ClientSession
class ProxySession(aiohttp.ClientSession): def __init__(self, *args, **kwargs): super(ProxySession, self).__init__(*args, trust_env=True, **kwargs) client = aiosnow.Client(session_cls=ProxySession) ...
The proxy information is then taken from the HTTP_PROXY or HTTPS_PROXY environment variables.
HTTP_PROXY
HTTPS_PROXY
If authentication is required, credentials are read from the ~/.netrc file: https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html
I'll look into simplifying this.
Sorry, something went wrong.
Many thanks Rob!!
I found the following works if you only want to use a proxy for aiosnow and not set the HTTP_PROXY or HTTPS_PROXY environment variables:
class ProxySession(aiohttp.ClientSession): async def _request(self, *args, **kwargs): return await super()._request(*args, proxy="http://proxy.com", **kwargs) client = aiosnow.Client(session_cls=ProxySession) ...
No branches or pull requests
I guess I have to configure it with aiohttp, but I don't see the option in aiosnow client module
The text was updated successfully, but these errors were encountered: