Ensure data is sent as bytes
This commit is contained in:
@@ -74,7 +74,7 @@ def call_api(
|
||||
if query:
|
||||
url += "?" + query
|
||||
if data:
|
||||
data = json.dumps(data)
|
||||
data = json.dumps(data).encode()
|
||||
|
||||
# Setup custom request and its headers
|
||||
req = RequestWithMethod(method, url)
|
||||
|
||||
Reference in New Issue
Block a user