Public Member Functions | |
def | data_received |
def | finish |
def | headers_received |
def | on_connection_close |
Implement this interface to handle an HTTP request or response. .. versionadded:: 4.0
Definition at line 491 of file httputil.py.
def tornado.httputil.HTTPMessageDelegate.data_received | ( | self, | |
chunk | |||
) |
Called when a chunk of data has been received. May return a `.Future` for flow control.
Reimplemented in tornado.web._RequestDispatcher, tornado.http1connection._GzipMessageDelegate, tornado.simple_httpclient._HTTPConnection, and tornado.httpserver._ServerRequestAdapter.
Definition at line 511 of file httputil.py.
def tornado.httputil.HTTPMessageDelegate.finish | ( | self | ) |
Called after the last chunk of data has been received.
Reimplemented in tornado.web._RequestDispatcher, tornado.http1connection._GzipMessageDelegate, tornado.simple_httpclient._HTTPConnection, and tornado.httpserver._ServerRequestAdapter.
Definition at line 518 of file httputil.py.
def tornado.httputil.HTTPMessageDelegate.headers_received | ( | self, | |
start_line, | |||
headers | |||
) |
Called when the HTTP headers have been received and parsed. :arg start_line: a `.RequestStartLine` or `.ResponseStartLine` depending on whether this is a client or server message. :arg headers: a `.HTTPHeaders` instance. Some `.HTTPConnection` methods can only be called during ``headers_received``. May return a `.Future`; if it does the body will not be read until it is done.
Reimplemented in tornado.web._RequestDispatcher, tornado.websocket.WebSocketClientConnection, tornado.http1connection._GzipMessageDelegate, tornado.simple_httpclient._HTTPConnection, and tornado.httpserver._ServerRequestAdapter.
Definition at line 496 of file httputil.py.
Called if the connection is closed without finishing the request. If ``headers_received`` is called, either ``finish`` or ``on_connection_close`` will be called, but not both.
Reimplemented in tornado.web._RequestDispatcher, tornado.websocket.WebSocketClientConnection, tornado.http1connection._GzipMessageDelegate, tornado.simple_httpclient._HTTPConnection, and tornado.httpserver._ServerRequestAdapter.
Definition at line 522 of file httputil.py.