======== Wrappers ======== .. module:: werkzeug.wrappers You can import all these objects directly from `werkzeug`. Base Wrappers ============= These objects implement a common set of operations. They are missing fancy addon functionality like user agent parsing or etag handling. These features are available by mixing in various mixin classes or using `Request` and `Response`. .. class:: werkzeug.wrappers.BaseRequest **Creating Request Objects** .. def:: werkzeug.wrappers.BaseRequest.__init__ .. def:: werkzeug.wrappers.BaseRequest.from_values .. def:: werkzeug.wrappers.BaseRequest.application **Properties** `path` The current path requested, relative to the position where the WSGI application is mounted (`PATH_INFO`). It will contain a leading slash and will be at least a string with a single slash when accessing the URL root. `script_root` The root path for the script (`SCRIPT_NAME`). Does not contain a trailing slash. `url` The full URL for the current request. `base_url` The current full URL without the query string. `url_root` The current URL up to the script root. `host_url` The current URL for the host. `host` The current hostname, without scheme. `is_secure` True if this is an HTTPS request. `is_multithread` True if this request was created in a multithreaded environment. `is_multiprocess` True if this request was created in a forking environment. `is_run_once` True if this request was created on the command line, a CGI script or a similar environment. `is_xhr` True if the request was triggered via an JavaScript XMLHttpRequest. This only works with libraries that support the X-Requested-With header and set it to "XMLHttpRequest". Libraries that do that are prototype, jQuery and Mochikit and probably some more. `method` The request method. `GET`, `POST` etc. `args` A dictionary-like object containing all given HTTP GET parameters. See the `MultiDict` documentation in the `utils`_ section. `form` A dictionary-like object containing all given HTTP POST parameters. See the `MultiDict` documentation in the `utils`_ section. This dict does not contain uploaded files, see `files` regarding that. `values` An immutable dictionary-like object containing both the `args` and `form` values. See the `CombinedMultiDict` documentation in the `utils`_ section. `cookies` A dictionary with the submitted cookie values. `files` A dictionary-like object containing all uploaded files. Each key in `files` is the name from the ````. Each value in `files` is a Werkzeug `FileStorage` object with the following members: - `filename` - The name of the uploaded file, as a Python string. - `type` - The content type of the uploaded file. - `data` - The raw content of the uploaded file. - `read()` - Read from the stream. Note that `files` will only contain data if the request method was POST and the ``