报错信息:tornado\simple_httpclient.py", line 365, in runraise KeyError("unknown method %s" % self.request.method) KeyError: 'unknown method delete' 解决方案:需要在调用时设置 allow_nonstandard_methods = True async def _do
报错信息:tornado\simple_httpclient.py", line 365, in run raise KeyError("unknown method %s" % self.request.method)
KeyError: 'unknown method delete'
解决方案:需要在调用时设置 allow_nonstandard_methods=True
async def _do_action(self, **kwargs):http_client = AsyncHTTPClient()
response = await http_client.fetch(kwargs.get('url'), method=kwargs.get('method'), raise_error=False,
body=kwargs.get('data'), headers=kwargs.headers,
request_timeout=kwargs.request_timeout,allow_nonstandard_methods=True)
return response.body
方法默认 allow_nonstandard_methods=True
【本文来自:日本服务器 http://www.558idc.com/jap.html 复制请保留原URL】