fixt cco.webapi.client.sendJson(): do not convert payload if it is bytes or str
This commit is contained in:
parent
f50d2befa5
commit
f46ae59f19
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ def sendJson(url, payload, cred, method):
|
|||
if url.startswith('test:'):
|
||||
resp = testing.request(method, url, json=payload, auth=cred)
|
||||
else:
|
||||
if isinstance(payload, str):
|
||||
if isinstance(payload, (str, bytes)):
|
||||
resp = requests.request(
|
||||
method, url, data=payload, auth=cred, timeout=10)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue