From f46ae59f19755e422786486373a3ed2c7c970d12 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Mon, 24 Nov 2025 17:34:11 +0100 Subject: [PATCH] fixt cco.webapi.client.sendJson(): do not convert payload if it is bytes or str --- cco/webapi/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cco/webapi/client.py b/cco/webapi/client.py index aa57467..38400a7 100644 --- a/cco/webapi/client.py +++ b/cco/webapi/client.py @@ -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: