Skip to content

Commit d0c434f

Browse files
authored
Replace deprecated HTTPResponse.getheader() (#195)
## Problem See gh-125 ## Solution This PR simply replaces the deprecated `HTTPResponse.getheader()` usages with the suggested `HTTResponse.headers`. ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [x] None of the above: Replacing deprecated usages ## Test Plan Describe specific steps for validating this change.
1 parent 5d12323 commit d0c434f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pinecone/core/client/rest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ def __init__(self, resp):
3838

3939
def getheaders(self):
4040
"""Returns a dictionary of the response headers."""
41-
return self.urllib3_response.getheaders()
41+
return self.urllib3_response.headers
4242

4343
def getheader(self, name, default=None):
4444
"""Returns a given response header."""
45-
return self.urllib3_response.getheader(name, default)
45+
return self.urllib3_response.headers.getheader(name, default)
4646

4747

4848
class RESTClientObject(object):

0 commit comments

Comments
 (0)