Closed adriang1174 closed 4 years ago
Hi Adrian,
I created the branch _Issue-3/add_proxiessupport with the fix. Could you confirm me if that fix the proxie problem? I added a new parameter to set the proxie when you initialize the environment, so it will use this param when sending the request as you suggest.
Thanks!
I've tested it. It Works OK. I just added the param to pyRofex.initialize call and that's it.
pyRofex.initialize(user=user, password=password, account=account, environment=pyRofex.Environment.REMARKET, proxies=proxies)
Nice and elegant solution! Thank you for your prompt response.
Are you going to close the issue? or merge the branch?
Excellent! Yes I merged it to master and close the issue.
Thanks for the feedback.
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
When working behind a proxy server (e.g. a company proxy) it throws an ApiException("Authentication fails. Incorrect User or Password")
The call to request.post (or get) doesn't include proxies param in args
The param "proxies" is included in request library but not used when called from rest_rfx.update_token and rest_rfx.api_request
Expected behavior A param for include proxy server configuration should be included. The following should work ok: proxies = {'http': 'server.company.com:80'}
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):