From 34e626c63368ad1e94f4440837619d34baa11516 Mon Sep 17 00:00:00 2001 From: sweetpotato0 Date: Tue, 14 Feb 2017 18:14:19 +0800 Subject: [PATCH] Update blueprints.py Blueprint.add_route add default methods: `GET` --- sanic/blueprints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanic/blueprints.py b/sanic/blueprints.py index 64a37da0..09b9540d 100644 --- a/sanic/blueprints.py +++ b/sanic/blueprints.py @@ -82,7 +82,7 @@ class Blueprint: return handler return decorator - def add_route(self, handler, uri, methods=None, host=None): + def add_route(self, handler, uri, methods=frozenset({'GET'}), host=None): """ Creates a blueprint route from a function. :param handler: Function to handle uri request.