Skip to content

Commit 1ec64b7

Browse files
refactor: use HTTResponse.headers instead deprecated HTTPResponse.getheader() (#601)
1 parent a804c51 commit 1ec64b7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## 1.38.0 [unreleased]
22

3+
### Bug Fixes
4+
1. [#601](https://github.com/influxdata/influxdb-client-python/pull/601): Use HTTResponse.headers to clear deprecation warning [urllib3]
5+
36
### Documentation
47
1. [#566](https://github.com/influxdata/influxdb-client-python/pull/566): Fix Sphinx documentation build and add support `.readthedocs.yml` V2 configuration file
58

influxdb_client/_sync/rest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def getheaders(self):
4747

4848
def getheader(self, name, default=None):
4949
"""Return a given response header."""
50-
return self.urllib3_response.getheader(name, default)
50+
return self.urllib3_response.headers.get(name, default)
5151

5252

5353
class RESTClientObject(object):

0 commit comments

Comments
 (0)