Skip to content

Commit 60b3309

Browse files
committed
[sc-sc-224905] utf-8 encoding of raw body
1 parent a9e4d30 commit 60b3309

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python-lib/rest_api_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ def request(self, method, url, can_raise_exeption=True, **kwargs):
128128
error_message = None
129129
status_code = None
130130
response_headers = None
131+
if "data" in kwargs:
132+
data = kwargs.get("data")
133+
if isinstance(data, str):
134+
kwargs["data"] = data.encode("utf-8")
131135
try:
132136
response = self.request_with_redirect_retry(method, url, **kwargs)
133137
status_code = response.status_code

0 commit comments

Comments
 (0)