Skip to content

Commit d32f982

Browse files
authored
update template (#1563)
1 parent 316b1cc commit d32f982

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.generator/src/generator/templates/api_client.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class ApiClient:
132132

133133
if return_http_data_only:
134134
return return_data
135-
return (return_data, response.status, response.headers.copy())
135+
return (return_data, response.status, dict(response.headers))
136136

137137
def parameters_to_multipart(self, params):
138138
"""Get parameters as list of tuples, formatting as json if value is dict.

.generator/src/generator/templates/exceptions.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class ApiException(OpenApiException):
9494
self.body = json.loads(http_resp.data)
9595
except Exception:
9696
self.body = http_resp.data.decode("utf-8")
97-
self.headers = http_resp.headers.copy()
97+
self.headers = dict(http_resp.headers)
9898
else:
9999
self.status = status
100100
self.reason = reason

0 commit comments

Comments
 (0)