0
我希望能够在龙卷风中记录HTTP请求和响应。 这似乎是容易的要求做:如何在Tornado中记录HTTP响应?
def log_function(handler):
info = {
'Method' : handler.request.method,
'Host' : handler.request.host,
'URL' : handler.request.uri
}
如何同样的事情来为响应实现?响应status_code可以通过调用
handler.get_status()
如何获得响应的主体?