Skip to content

Commit

Permalink
response.context为bytes而不是string,使用response.text替代
Browse files Browse the repository at this point in the history
  • Loading branch information
jacexh authored Sep 22, 2022
1 parent 4e27e17 commit d388a58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shouqianba/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def _call_api(self, endpoint, method="post", req_kwargs=None, interceptor=None):
self.logger.info("start request", extra=dict(method=method, parameters=kwargs, url=url))
response = requests.request(method, url, **kwargs)
self.logger.info("got response", extra=dict(
response=response.content, status_code=response.status_code,
response=response.text, status_code=response.status_code,
elapsed=response.elapsed.microseconds/1000)) # elapsed并非指完整的请求耗时,而是指获取到headers的耗时

for handler in self.response_handlers:
Expand Down

0 comments on commit d388a58

Please # to comment.