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

Added headers parameter to InfluxDBClient #710

Merged
merged 1 commit into from
Apr 14, 2020

Conversation

nathanielatom
Copy link
Contributor

Hi, we'd like to use the DataFrameClient for writing and querying data from our Influx DB, which is accessible through an API Gateway we have setup. This requires an API key in the header of any requests for authentication.

This commit simply adds an optional headers parameter to InfluxDBClient.__init__. The default is {} and if 'Content-Type' or 'Accept' aren't present they'll be added with the same values as before.

Note I also made another very small change in InfluxDBClient.write which I think provides a small bug fix, since previously the 'Content-Type' of the self._headers dict was getting inadvertently modified.

@sebito91
Copy link
Contributor

Thanks @nathanielatom will take a look and get back to you!

@nathanielatom
Copy link
Contributor Author

@sebito91 any thoughts or feedback?

@sebito91 sebito91 self-assigned this Apr 8, 2020
@sebito91
Copy link
Contributor

@nathanielatom I'm sorry for the extremely late reply, but I think this is a nice PR. Could you please rebase against master and make sure to take the current defaults there?

Copy link
Contributor

@sebito91 sebito91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase against master please!

@nathanielatom
Copy link
Contributor Author

Sure! :)

@nathanielatom nathanielatom requested a review from sebito91 April 13, 2020 21:50
Copy link
Contributor

@sebito91 sebito91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sebito91 sebito91 merged commit 7fb5e94 into influxdata:master Apr 14, 2020
sebito91 added a commit that referenced this pull request Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants