tornado/website/sphinx/web.rst

121 lines
3.6 KiB
ReStructuredText
Raw Normal View History

2011-06-11 21:48:46 +00:00
``tornado.web`` --- ``RequestHandler`` and ``Application`` classes
==================================================================
.. automodule:: tornado.web
2011-06-09 08:15:56 +00:00
Request handlers
----------------
.. autoclass:: RequestHandler
2011-06-11 21:35:54 +00:00
Entry points
^^^^^^^^^^^^
2011-06-11 21:35:54 +00:00
.. automethod:: RequestHandler.initialize
.. automethod:: RequestHandler.prepare
2012-01-23 01:52:43 +00:00
.. automethod:: RequestHandler.on_finish
2011-06-11 21:35:54 +00:00
Implement any of the following methods to handle the corresponding
HTTP method.
.. automethod:: RequestHandler.get
.. automethod:: RequestHandler.post
.. automethod:: RequestHandler.put
.. automethod:: RequestHandler.delete
.. automethod:: RequestHandler.head
.. automethod:: RequestHandler.options
Input
^^^^^
.. automethod:: RequestHandler.get_argument
.. automethod:: RequestHandler.get_arguments
.. automethod:: RequestHandler.decode_argument
2011-06-17 05:36:33 +00:00
.. attribute:: RequestHandler.request
The `tornado.httpserver.HTTPRequest` object containing additional
request parameters including e.g. headers and body data.
2011-06-11 21:35:54 +00:00
Output
^^^^^^
.. automethod:: RequestHandler.set_status
.. automethod:: RequestHandler.set_header
2011-09-04 22:39:55 +00:00
.. automethod:: RequestHandler.add_header
.. automethod:: RequestHandler.set_default_headers
2011-06-11 21:35:54 +00:00
.. automethod:: RequestHandler.write
.. automethod:: RequestHandler.flush
.. automethod:: RequestHandler.finish
.. automethod:: RequestHandler.render
.. automethod:: RequestHandler.render_string
.. automethod:: RequestHandler.get_template_namespace
2011-06-11 21:35:54 +00:00
.. automethod:: RequestHandler.redirect
.. automethod:: RequestHandler.send_error
.. automethod:: RequestHandler.write_error
2011-06-11 21:35:54 +00:00
.. automethod:: RequestHandler.clear
Cookies
^^^^^^^
.. autoattribute:: RequestHandler.cookies
.. automethod:: RequestHandler.get_cookie
.. automethod:: RequestHandler.set_cookie
.. automethod:: RequestHandler.clear_cookie
.. automethod:: RequestHandler.clear_all_cookies
.. automethod:: RequestHandler.get_secure_cookie
.. automethod:: RequestHandler.set_secure_cookie
.. automethod:: RequestHandler.create_signed_value
Other
^^^^^
2011-06-17 05:36:33 +00:00
.. attribute:: RequestHandler.application
The `Application` object serving this request
2011-06-11 21:35:54 +00:00
.. automethod:: RequestHandler.async_callback
.. automethod:: RequestHandler.check_xsrf_cookie
.. automethod:: RequestHandler.compute_etag
.. automethod:: RequestHandler.get_browser_locale
.. automethod:: RequestHandler.get_current_user
.. automethod:: RequestHandler.get_login_url
.. automethod:: RequestHandler.get_status
.. automethod:: RequestHandler.get_template_path
.. automethod:: RequestHandler.get_user_locale
.. automethod:: RequestHandler.on_connection_close
.. automethod:: RequestHandler.require_setting
.. automethod:: RequestHandler.reverse_url
2011-06-17 05:36:33 +00:00
.. autoattribute:: RequestHandler.settings
2011-06-11 21:35:54 +00:00
.. automethod:: RequestHandler.static_url
.. automethod:: RequestHandler.xsrf_form_html
2011-06-09 08:15:56 +00:00
Application configuration
-----------------------------
.. autoclass:: Application
:members:
2011-06-09 08:15:56 +00:00
.. autoclass:: URLSpec
The ``URLSpec`` class is also available under the name ``tornado.web.url``.
Decorators
----------
.. autofunction:: asynchronous
.. autofunction:: authenticated
.. autofunction:: addslash
.. autofunction:: removeslash
Everything else
---------------
.. autoexception:: HTTPError
.. autoclass:: UIModule
:members:
.. autoclass:: ErrorHandler
.. autoclass:: FallbackHandler
.. autoclass:: RedirectHandler
.. autoclass:: StaticFileHandler
:members: