Skip to content
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

Add proxy support for HTTP requests #1

Merged
merged 1 commit into from
Oct 31, 2017
Merged

Add proxy support for HTTP requests #1

merged 1 commit into from
Oct 31, 2017

Conversation

cyberbit
Copy link
Owner

This adds explicit proxy support for API endpoints using standard HTTP requests. In many cases, requests simply reads the HTTP_PROXY and HTTPS_PROXY environment variables. However, in my case, I have (closed-source) software that treats HTTPS_PROXY differently than everything else, so I cannot set it without causing errors. This change allows me to patch my unusual environment.

Usage:

pb = PushBullet('xxx', {'http': 'http://10.0.0.1:8100', 'https': 'https://10.0.0.1:8101'})

The format and behavior is exactly as defined here: http://docs.python-requests.org/en/master/user/advanced/#proxies

@cyberbit cyberbit merged commit 990ad83 into master Oct 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant