Update blueprints.py

Blueprint.add_route add default methods: `GET`
This commit is contained in:
sweetpotato0 2017-02-14 18:14:19 +08:00 committed by GitHub
parent 1866e4ef44
commit 34e626c633

View File

@ -82,7 +82,7 @@ class Blueprint:
return handler return handler
return decorator 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. Creates a blueprint route from a function.
:param handler: Function to handle uri request. :param handler: Function to handle uri request.