From 96c13fe23c84193da0e2cf8c0a7756cc021578b9 Mon Sep 17 00:00:00 2001 From: narzeja Date: Sat, 22 Oct 2016 08:47:51 +0200 Subject: [PATCH] post method requires 'GET' --- examples/sanic_peewee.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/sanic_peewee.py b/examples/sanic_peewee.py index a364d3ce..038c5249 100644 --- a/examples/sanic_peewee.py +++ b/examples/sanic_peewee.py @@ -51,6 +51,8 @@ app = Sanic('peewee_example') @app.route('/post') async def post(request): + """ This is actually a GET request, you probably want POST in real life, + with some data parameters""" obj = await objects.create(KeyValue, key='my_first_async_db', text="I was inserted asynchronously!") return json({'object_id': obj.id})