本文整理汇总了Python中tornado.web.RequestHandler.SUPPORTED_METHODS属性的典型用法代码示例。如果您正苦于以下问题:Python RequestHandler.SUPPORTED_METHODS属性的具体用法?Python RequestHandler.SUPPORTED_METHODS怎么用?Python RequestHandler.SUPPORTED_METHODS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类tornado.web.RequestHandler
的用法示例。
在下文中一共展示了RequestHandler.SUPPORTED_METHODS属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: other
# 需要导入模块: from tornado.web import RequestHandler [as 别名]
# 或者: from tornado.web.RequestHandler import SUPPORTED_METHODS [as 别名]
def other(self):
# Even though this method exists, it won't get called automatically
# because it is not in SUPPORTED_METHODS.
self.write('other')
示例2: __init__
# 需要导入模块: from tornado.web import RequestHandler [as 别名]
# 或者: from tornado.web.RequestHandler import SUPPORTED_METHODS [as 别名]
def __init__(self, path, methods, handler, options={}):
self.path = path
self.handler = handler
self.options = options
self.methods = []
if methods == "any":
self.methods = []
else:
for method in methods:
method = method.upper()
if method in self.SUPPORTED_METHODS:
self.methods.append(method)