-
Notifications
You must be signed in to change notification settings - Fork 67
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
Feat/support proxy #505
Feat/support proxy #505
Conversation
b789157
to
293cc7d
Compare
293cc7d
to
e87f5c7
Compare
This commit brings support for user-defined proxy addresses, defined by the `HTTP_PROXY` or `HTTPS_PROXY` environment variables, or via the `Config.proxies` dictionnary of the form: ```py Config.proxies = { 'http: 'https://127.0.0.1:8080', 'https: 'https://127.0.0.1:8080', } ``` This works for both the `Requester` and the `RequesterAsync`.
35a813f
to
6201a36
Compare
@@ -37,7 +37,7 @@ def send(self, request): | |||
|
|||
try: | |||
response = self._session.send( # type: ignore | |||
r, timeout=requests_timeout | |||
r, timeout=requests_timeout, proxies=request.proxies, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend having this format to have a better readability.
r, timeout=requests_timeout, proxies=request.proxies, | |
r, | |
timeout=requests_timeout, | |
proxies=request.proxies, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the recommendation buddy!
Regarding the formatting, I suggest to work on that in a different PR. For now, it seems that the formatting is losely enforced by a (too?) lightweight flake8 configuration. IMHO we should enforce a stricter flake8 or black configuration to avoid any formatting discussion in the future.
Let me know what you think about this, and let's make this happen soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot Anthony for working on this 🎉 .
This look good to me. I've left a comment feel free to answer me if you think this isn't relevant.
cf3723a
to
2439aed
Compare
2439aed
to
9541c05
Compare
* chore(cts): update dependency on cts generation for java * chore: remove getPackageDependencies from the base class
Summary
This commit brings support for user-defined proxy addresses, defined by
the
HTTP_PROXY
orHTTPS_PROXY
environment variables, or via theConfig.proxies
dictionnary of the form:This works for both the
Requester
and theRequesterAsync
.