是否有可能设置一个龙卷风服务器在某个端口上运行,在多个URL上主动提供一个API,并让它在该端口上请求的每个其他URL上返回一个HTTP 400: Bad request?例如,我已经在http://example.com:1234/get和http://example.com:1234/post上分别运行了一个简单的GET和POST API,它们酌情返回2xx状态,但是请求
我有处理post请求和返回一些JSON到客户端的处理程序,在我返回之前,我需要验证输入数据,如果数据没有通过验证,我需要在头部(我不知道如何修改头部和放置额外的键),它不是通过验证标志下键验证或其他任何东西def post(self): key = data.get('key', Nonevalue False to header and send back to
使用debian拉伸测试和ubuntu 16.04测试结果相同。Python 3.6.1,from datetime import datetimeimport tornado.genfrom tornado.httpclient import AsyncHTTPClient
# the same for tornado</e