fix encode of response in client
This commit is contained in:
parent
4a5ad374f8
commit
7c93fc68c5
|
@ -260,12 +260,14 @@ class UserClientFlask:
|
|||
data=None,
|
||||
follow_redirects=True,
|
||||
content_type='text/html; charset=utf-8',
|
||||
decode=True,
|
||||
**kw,
|
||||
):
|
||||
|
||||
body, status, headers = self.client.get(
|
||||
uri, data=data, follow_redirects=follow_redirects, headers=self.headers
|
||||
)
|
||||
if decode:
|
||||
body = next(body).decode("utf-8")
|
||||
return (body, status)
|
||||
|
||||
|
@ -275,6 +277,7 @@ class UserClientFlask:
|
|||
data=None,
|
||||
follow_redirects=True,
|
||||
content_type='application/x-www-form-urlencoded',
|
||||
decode=True,
|
||||
**kw,
|
||||
):
|
||||
|
||||
|
@ -285,5 +288,6 @@ class UserClientFlask:
|
|||
headers=self.headers,
|
||||
content_type=content_type,
|
||||
)
|
||||
if decode:
|
||||
body = next(body).decode("utf-8")
|
||||
return (body, status)
|
||||
|
|
Reference in New Issue