浏览代码

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: