Kaynağa Gözat

Try data={} in stead of json={} in requests.post()

Foppe Hemminga 6 yıl önce
ebeveyn
işleme
097fcd2315
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      view.py

+ 2 - 1
view.py

@@ -20,7 +20,8 @@ def broadcast(this_text):
         pprint(this_json)
         url = base_url+webhook
         print(url)
-        response = requests.post(url, json=this_json)
+        # response = requests.post(url, json=this_json)
+        response = requests.post(url, data=this_json)
         if response.status_code in [200, 204]:
             print("Webhook executed")
         else: