Преглед на файлове

print what is sent to server if debugging

Eren Yilmaz преди 5 години
родител
ревизия
d10dd2f004
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  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: