Ensure data is sent as bytes

This commit is contained in:
Elliot Jordan
2019-12-05 19:03:17 -08:00
parent e194ba37fe
commit c3afbccce8
+1 -1
View File
@@ -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)