Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

add option to use Requests http(s) proxy #262

Merged
merged 1 commit into from
Nov 13, 2015
Merged

add option to use Requests http(s) proxy #262

merged 1 commit into from
Nov 13, 2015

Conversation

frennkie
Copy link
Contributor

@frennkie frennkie commented Nov 7, 2015

The influxdb-python client does not have support for a web proxy although
the Requests library provides the possibility to use a web proxy for both
http and https requests.
This PR (optionally) adds the feature to use a http(s) proxy by adding
an additional parameter to InfluxDBClient initialization called´"proxies".
This parameter expects that a dict is provided. If this is not set it will
default to { }.
The syntax for the dict is the same as specified in Requests docs:
http://docs.python-requests.org/en/latest/user/advanced/#proxies
proxies = {
"http": "http://10.10.1.10:3128",
"https": "http://10.10.1.10:1080",
}

The influxdb-python client does not have support for a web proxy although
the Requests library provides the possibility to use a web proxy for both
http and https requests.
This PR (optionally) adds the feature to use a http(s) proxy by adding
an additional parameter to InfluxDBClient initialization called´"proxies".
This parameter expects that a dict is provided. If this is not set it will
default to { }.
The syntax for the dict is the same as specified in Requests docs:
http://docs.python-requests.org/en/latest/user/advanced/#proxies
proxies = {
  "http": "http://10.10.1.10:3128",
  "https": "http://10.10.1.10:1080",
}
@aviau
Copy link
Collaborator

aviau commented Nov 13, 2015

Thank you for contributing!

aviau added a commit that referenced this pull request Nov 13, 2015
add option to use Requests http(s) proxy (Thanks @frennkie!)
@aviau aviau merged commit 0c1e522 into influxdata:master Nov 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants