Closed iamhsa closed 4 years ago
I try to use reqman behind a proxy. I configure proxy via environment variables. My test is the README's getting started
$ reqman new https://pypi.org/pypi/reqman/json
$ reqman . Use 'reqman.conf' TEST: /home/hugo.salesses/workspace/vwis/conso_edit_loadtests/test/reqman/0010_test.rml * GET https://pypi.org/pypi/reqman/json --> Unreachable - KO : status != 200 RESULT: 0/1 (1req(s))
I read the aiohttp documentation and I found a variable trust_env=True that get proxies information from HTTP_PROXY / HTTPS_PROXY environment variables if the parameter is True. See : https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientSession
trust_env=True
I have test it in reqman.py, and it works.
If you want I can make a PR.
Edit : finish my message :-)
Thanks a lot I ve never try proxies with reqman. But I accept pr, for sure It could be a regular need.
thanks ! and sorry for the delay ! will work for versions > 2.2.5.0
I try to use reqman behind a proxy. I configure proxy via environment variables. My test is the README's getting started
I read the aiohttp documentation and I found a variable
trust_env=True
that get proxies information from HTTP_PROXY / HTTPS_PROXY environment variables if the parameter is True. See : https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientSessionI have test it in reqman.py, and it works.
If you want I can make a PR.
Edit : finish my message :-)