Skip to content

Commit 35a3554

Browse files
committed
payload fix
1 parent bf6b1aa commit 35a3554

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • whatsapp_api_client_python

whatsapp_api_client_python/API.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ def request(self, method: str, url: str,
4646
text = ''
4747
try:
4848
headers = {}
49+
payloadJson = None
4950
if payload != None:
5051
headers = {
5152
'Content-Type': 'application/json'
52-
}
53+
}
54+
payloadJson = json.dumps(payload)
5355
result = requests.request(method, url, headers = headers,
54-
data = json.dumps(payload),
56+
data = payloadJson,
5557
files = files)
5658
result.raise_for_status()
5759
status_code = result.status_code

0 commit comments

Comments
 (0)