我想在龙卷风上实现某种API,我有这样的问题: 是否有可能将两个网址路由到一个处理程序分离的方法。路由2网址到1处理程序
class Handler():
def get(self):
#only for the first url
def post(self):
#only for the secornd url
handlers = [
(r"/url1",Handler), #only GET are allowed
(r"/url2",Handler), #only POST are allowed
]
因此,如果有人试图发送POST到第一URL中他应该会看到错误消息
谢谢我现在用这个 – lwolf