Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
tornado.httputil.HTTPServerRequest Class Reference

List of all members.

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
 body_arguments
 connection
 files
 headers
 host
 method
 protocol
 query
 query_arguments
 remote_ip
 uri
 version

Private Member Functions

def _parse_body

Private Attributes

 _cookies
 _finish_time
 _start_time

Detailed Description

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

   `.HTTPHeaders` 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`` or ``X-Forwarded-For`` header.

.. versionchanged:: 3.1
   The list format of ``X-Forwarded-For`` is now supported.

.. 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:: query_arguments

   Same format as ``arguments``, but contains only arguments extracted
   from the query string.

   .. versionadded:: 3.2

.. attribute:: body_arguments

   Same format as ``arguments``, but contains only arguments extracted
   from the request body.

   .. versionadded:: 3.2

.. attribute:: files

   File uploads are available in the files property, which maps file
   names to lists of `.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.

.. versionchanged:: 4.0
   Moved from ``tornado.httpserver.HTTPRequest``.

Definition at line 233 of file httputil.py.


Constructor & Destructor Documentation

def tornado.httputil.HTTPServerRequest.__init__ (   self,
  method = None,
  uri = None,
  version = "HTTP/1.0",
  headers = None,
  body = None,
  host = None,
  files = None,
  connection = None,
  start_line = None 
)

Definition at line 325 of file httputil.py.


Member Function Documentation

Definition at line 441 of file httputil.py.

Definition at line 432 of file httputil.py.

A dictionary of Cookie.Morsel objects.

Definition at line 363 of file httputil.py.

Finishes this HTTP request on the open connection.

.. deprecated:: 4.0
   Use ``request.connection`` and the `.HTTPConnection` methods
   to write the response.

Definition at line 385 of file httputil.py.

Reconstructs the full URL for this request.

Definition at line 395 of file httputil.py.

def tornado.httputil.HTTPServerRequest.get_ssl_certificate (   self,
  binary_form = False 
)
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"))

By default, the return value is a dictionary (or None, if no
client certificate is present).  If ``binary_form`` is true, a
DER-encoded form of the certificate is returned instead.  See
SSLSocket.getpeercert() in the standard library for more
details.
http://docs.python.org/library/ssl.html#sslsocket-objects

Definition at line 406 of file httputil.py.

Returns the amount of time it took for this request to execute.

Definition at line 399 of file httputil.py.

Returns True if this request supports HTTP/1.1 semantics.

.. deprecated:: 4.0
   Applications are less likely to need this information with the
   introduction of `.HTTPConnection`.  If you still need it, access
   the ``version`` attribute directly.

Definition at line 352 of file httputil.py.

def tornado.httputil.HTTPServerRequest.write (   self,
  chunk,
  callback = None 
)
Writes the given chunk to the response stream.

.. deprecated:: 4.0
   Use ``request.connection`` and the `.HTTPConnection` methods
   to write the response.

Definition at line 375 of file httputil.py.


Member Data Documentation

Definition at line 363 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.

Definition at line 325 of file httputil.py.


The documentation for this class was generated from the following file:


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Thu Aug 27 2015 14:50:40