Except as otherwise noted,
the content of this page is licensed under a Creative Commons
license, and examples are licensed under
an Apache
license.
Google Code offered in: 中文 - English - Português - Pусский - Español - 日本語
The RequestHandler class is the superclass for an HTTP request handler.
RequestHandler
is provided by the google.appengine.ext.webapp
module.
A webapp application defines one or more RequestHandler classes to handle requests. A handler class overrides one or more of the following methods to handle HTTP requests of the corresponding kind: get(), post(), head(), options(), put(), delete(), or trace().
The base class for an HTTP request handler.
The constructor takes no arguments. The instance can be initialized with the initialize() method.
Subclasses of the RequestHandler class inherit or override the following methods:
True
it prints a stack trace to the browser. Otherwise it just prints a plain error message. A RequestHandler class can override this method to provide custom behavior.self.response.clear()
and self.response.set_status(code)
.Location:
header to redirect to uri, and clears the response output stream. If permanent is True
, it uses the HTTP status code 301 for a permanent redirect. Otherwise, it uses the HTTP status code 302 for a temporary redirect.An instance of a subclass of RequestHandler has the following attributes:
request
response