From fd0376c5a8f018457a11bb0f9602bda366571955 Mon Sep 17 00:00:00 2001 From: leonoverweel Date: Tue, 4 Apr 2017 15:23:00 +0200 Subject: Return proper status codes of HTTP Instead of always 200 --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'main.py') diff --git a/main.py b/main.py index ec404239..3dbb2a53 100644 --- a/main.py +++ b/main.py @@ -142,7 +142,9 @@ def api_call(version, endpoint_path): ) sys.stdout.flush() - return jsonify(json.loads(response.to_JSON())) + flask_response = jsonify(json.loads(response.to_JSON())) + flask_response.status_code = response.status['code'] + return flask_response @SOCKET_IO_CORE.on('request') def receive_message(message): -- cgit v1.2.3