Sfoglia il codice sorgente

print what is sent to server if debugging

Eren Yilmaz 5 anni fa
parent
commit
d10dd2f004
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      connection.py

+ 2 - 0
connection.py

@@ -13,6 +13,8 @@ json_headers = {'Content-type': 'application/json'}
 
 
 def client_request(route, data):
+    if debug:
+        print('Sending to Server: ' + str(json.dumps(data)))
     r = requests.post(host + '/' + route, data=json.dumps(data),
                       headers=json_headers)
     if debug: