Public Member Functions | |
def | __init__ |
def | __repr__ |
def | cookies |
def | finish |
def | full_url |
def | get_ssl_certificate |
def | request_time |
def | supports_http_1_1 |
def | write |
Public Attributes | |
arguments | |
body | |
connection | |
files | |
headers | |
host | |
method | |
protocol | |
query | |
remote_ip | |
uri | |
version | |
Private Member Functions | |
def | _valid_ip |
Private Attributes | |
_cookies | |
_finish_time | |
_start_time |
A single HTTP request. All attributes are type `str` unless otherwise noted. .. attribute:: method HTTP request method, e.g. "GET" or "POST" .. attribute:: uri The requested uri. .. attribute:: path The path portion of `uri` .. attribute:: query The query portion of `uri` .. attribute:: version HTTP version specified in request, e.g. "HTTP/1.1" .. attribute:: headers `HTTPHeader` dictionary-like object for request headers. Acts like a case-insensitive dictionary with additional methods for repeated headers. .. attribute:: body Request body, if present, as a byte string. .. attribute:: remote_ip Client's IP address as a string. If `HTTPServer.xheaders` is set, will pass along the real IP address provided by a load balancer in the ``X-Real-Ip`` header .. attribute:: protocol The protocol used, either "http" or "https". If `HTTPServer.xheaders` is set, will pass along the protocol used by a load balancer if reported via an ``X-Scheme`` header. .. attribute:: host The requested hostname, usually taken from the ``Host`` header. .. attribute:: arguments GET/POST arguments are available in the arguments property, which maps arguments names to lists of values (to support multiple values for individual names). Names are of type `str`, while arguments are byte strings. Note that this is different from `RequestHandler.get_argument`, which returns argument values as unicode strings. .. attribute:: files File uploads are available in the files property, which maps file names to lists of :class:`HTTPFile`. .. attribute:: connection An HTTP request is attached to a single HTTP connection, which can be accessed through the "connection" attribute. Since connections are typically kept open in HTTP/1.1, multiple requests can be handled sequentially on a single connection.
Definition at line 295 of file httpserver.py.
def tornado.httpserver.HTTPRequest.__init__ | ( | self, | |
method, | |||
uri, | |||
version = "HTTP/1.0" , |
|||
headers = None , |
|||
body = None , |
|||
remote_ip = None , |
|||
protocol = None , |
|||
host = None , |
|||
files = None , |
|||
connection = None |
|||
) |
Definition at line 367 of file httpserver.py.
def tornado.httpserver.HTTPRequest.__repr__ | ( | self | ) |
Definition at line 469 of file httpserver.py.
def tornado.httpserver.HTTPRequest._valid_ip | ( | self, | |
ip | |||
) | [private] |
Definition at line 476 of file httpserver.py.
def tornado.httpserver.HTTPRequest.cookies | ( | self | ) |
A dictionary of Cookie.Morsel objects.
Definition at line 414 of file httpserver.py.
def tornado.httpserver.HTTPRequest.finish | ( | self | ) |
Finishes this HTTP request on the open connection.
Definition at line 431 of file httpserver.py.
def tornado.httpserver.HTTPRequest.full_url | ( | self | ) |
Reconstructs the full URL for this request.
Definition at line 436 of file httpserver.py.
Returns the client's SSL certificate, if any. To use client certificates, the HTTPServer must have been constructed with cert_reqs set in ssl_options, e.g.:: server = HTTPServer(app, ssl_options=dict( certfile="foo.crt", keyfile="foo.key", cert_reqs=ssl.CERT_REQUIRED, ca_certs="cacert.crt")) The return value is a dictionary, see SSLSocket.getpeercert() in the standard library for more details. http://docs.python.org/library/ssl.html#sslsocket-objects
Definition at line 447 of file httpserver.py.
def tornado.httpserver.HTTPRequest.request_time | ( | self | ) |
Returns the amount of time it took for this request to execute.
Definition at line 440 of file httpserver.py.
def tornado.httpserver.HTTPRequest.supports_http_1_1 | ( | self | ) |
Returns True if this request supports HTTP/1.1 semantics
Definition at line 409 of file httpserver.py.
def tornado.httpserver.HTTPRequest.write | ( | self, | |
chunk, | |||
callback = None |
|||
) |
Writes the given chunk to the response stream.
Definition at line 426 of file httpserver.py.
Definition at line 414 of file httpserver.py.
Definition at line 367 of file httpserver.py.
Definition at line 367 of file httpserver.py.
Definition at line 367 of file httpserver.py.
Definition at line 367 of file httpserver.py.
Definition at line 367 of file httpserver.py.
Definition at line 367 of file httpserver.py.
Definition at line 367 of file httpserver.py.
Definition at line 367 of file httpserver.py.
Definition at line 367 of file httpserver.py.
Definition at line 367 of file httpserver.py.
Definition at line 367 of file httpserver.py.
Definition at line 367 of file httpserver.py.
Definition at line 367 of file httpserver.py.
Definition at line 367 of file httpserver.py.