From 9aa4756887d6ff6851d1ddc59a57eebadff4e6c2 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Fri, 2 Mar 2018 20:45:37 +0100 Subject: [PATCH] Fix incorrect parsing of JSON request --- cuizin/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuizin/web.py b/cuizin/web.py index b8eefbd..7ff8e95 100644 --- a/cuizin/web.py +++ b/cuizin/web.py @@ -59,7 +59,7 @@ def api_v1_recipes_post(): """ Create a new recipe from URL """ - data = json.load(bottle.request.body) + data = json.loads(bottle.request.body.read().decode('utf-8')) if 'url' not in data: return { 'error': 'No URL provided'