jacinle.web.app package¶
-
class
jacinle.web.app.JacRequestHandler(*args, **kwargs)[source]¶ Bases:
tornado.web.RequestHandler-
finish(*args, **kwargs)[source]¶ Finishes this response, ending the HTTP request.
Passing a
chunktofinish()is equivalent to passing that chunk towrite()and then callingfinish()with no arguments.Returns a .Future which may optionally be awaited to track the sending of the response to the client. This .Future resolves when all the response data has been sent, and raises an error if the connection is closed before all data can be sent.
Changed in version 5.1: Now returns a .Future instead of
None.
-
get_argument(name, default=<tornado.web._ArgDefaultMarker object>, strip=True, type=None, danger_set=None)[source]¶ Returns the value of the argument with the given name.
If default is not provided, the argument is considered to be required, and we raise a MissingArgumentError if it is missing.
If the argument appears in the request more than once, we return the last value.
This method searches both the query and body arguments.
-
get_body_argument(name, default=<tornado.web._ArgDefaultMarker object>, strip=True, type=None, danger_set=None)[source]¶ Returns the value of the argument with the given name from the request body.
If default is not provided, the argument is considered to be required, and we raise a MissingArgumentError if it is missing.
If the argument appears in the url more than once, we return the last value.
New in version 3.2.
-
get_query_argument(name, default=<tornado.web._ArgDefaultMarker object>, strip=True, type=None, danger_set=None)[source]¶ Returns the value of the argument with the given name from the request query string.
If default is not provided, the argument is considered to be required, and we raise a MissingArgumentError if it is missing.
If the argument appears in the url more than once, we return the last value.
New in version 3.2.
-
get_template_namespace()[source]¶ Returns a dictionary to be used as the default template namespace.
May be overridden by subclasses to add or modify values.
The results of this method will be combined with additional defaults in the tornado.template module and keyword arguments to render or render_string.
-