def google.appengine.runtime.wsgi.WsgiRequest.__init__ |
( |
|
self, |
|
|
|
environ, |
|
|
|
handler_name, |
|
|
|
url, |
|
|
|
post_data, |
|
|
|
error |
|
) |
| |
Creates a single WSGI request.
Creates a request for handler_name in the form 'path.to.handler' for url
with the environment contained in environ.
Args:
environ: A dict containing the environ for this request (e.g. like from
os.environ).
handler_name: A str containing the user-specified handler to use for this
request as specified in the script field of a handler in app.yaml
using the Python dot notation; e.g. 'package.module.application'.
url: An urlparse.SplitResult instance containing the request url.
post_data: A stream containing the post data for this request.
error: A stream into which errors are to be written.
def google.appengine.runtime.wsgi.WsgiRequest.Handle |
( |
|
self | ) |
|
Handles the request represented by the WsgiRequest object.
Loads the handler from the handler name provided. Calls the handler with the
environ. Any exceptions in loading the user handler and executing it are
caught and logged.
Returns:
A dict containing:
error: App Engine error code. 0 for OK, 1 for error.
response_code: HTTP response code.
headers: A list of tuples (key, value) of HTTP headers.
body: A str of the body of the response
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/runtime/wsgi.py