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

Proxy support #10

Open
michalmarczuk opened this issue Apr 27, 2018 · 1 comment
Open

Proxy support #10

michalmarczuk opened this issue Apr 27, 2018 · 1 comment

Comments

@michalmarczuk
Copy link

Hi,
This is not an issue but feature request :)

Could you add proxy support? It will be easier to debug requests.

Thank you in advance.

@MaLevi4
Copy link

MaLevi4 commented Apr 22, 2019

Because this repo uses Requests lib for sync requests you can use 2 ways for setting proxy.

  • Set environment variable HTTP_PROXY or\and HTTPS_PROXY.
    Documentation of Requests lib (Ctrl+F by word proxy)

  • Use additional argument 'proxies' while using your methods.
    For example I'll add here code from the last example of Quickstart page
    Instead of using default
    response = github_api.events.public_events(body=None, params={}, headers={})
    You can use
    response = github_api.events.public_events(body=None, params={}, headers={}, proxies={'http':"http://user:pass@10.10.1.10:3128/", 'https': "http://user:pass@10.10.1.10:3128/"})
    Syntax of proxies dict you can find in Requests lib documentation (Ctrl+F by word proxy)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants