manatlan / reqman

Reqman is a postman killer ;-)
GNU General Public License v2.0
59 stars 12 forks source link

Seems not working beind proxy #4

Closed iamhsa closed 4 years ago

iamhsa commented 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

I have test it in reqman.py, and it works.

If you want I can make a PR.

Edit : finish my message :-)

manatlan commented 4 years ago

Thanks a lot I ve never try proxies with reqman. But I accept pr, for sure It could be a regular need.

manatlan commented 4 years ago

thanks ! and sorry for the delay ! will work for versions > 2.2.5.0