diff --git a/volcenginesdkcore/rest.py b/volcenginesdkcore/rest.py index 64da7f21..18f2d1b2 100644 --- a/volcenginesdkcore/rest.py +++ b/volcenginesdkcore/rest.py @@ -35,11 +35,11 @@ def __init__(self, resp): def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.urllib3_response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.urllib3_response.headers.get(name, default) def log_request(method, url, query_params, headers, body, post_params, request_time_out):