From e2c7880ca29a1104f64ecff3d06473d2e6de2f2d Mon Sep 17 00:00:00 2001 From: "Casper V. Kristensen" Date: Sat, 6 Apr 2019 19:11:40 +0200 Subject: [PATCH] Print. --- server/nightr/app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/nightr/app.py b/server/nightr/app.py index f1f534e..07842cd 100644 --- a/server/nightr/app.py +++ b/server/nightr/app.py @@ -34,9 +34,11 @@ strategies = { @app.route("/", methods=["GET", "POST"]) def probabilities(): + if request.method == 'GET': + logger.warning("GET request: using default context parameters") phone_data = request.get_json(force=True) - context = Context(**phone_data) logger.debug("phone_data:\n%s", json.dumps(phone_data, indent=2)) + context = Context(**phone_data) logger.debug("Context: %s", context) predictions: List[dict] = []