class documentation

class LocalRequest(BaseRequest):

View In Hierarchy

A thread-local subclass of BaseRequest with a different set of attributes for each thread. There is usually only one global instance of this class (request). If accessed during a request/response cycle, this instance always refers to the current request (even on a multithreaded server).
Class Variable environ Undocumented

Inherited from BaseRequest:

Method copy Return a new Request with a shallow environ copy.
Method get​_cookie No summary
Method get​_header Return the value of a request header, or a given default value.
Method path​_shift Shift path segments from path to script_name and vice versa.
Constant MEMFILE​_MAX Undocumented
Method __delitem__ Undocumented
Method __getattr__ Search in self.environ for additional user defined attributes.
Method __getitem__ Undocumented
Method __init__ Wrap a WSGI environ dictionary.
Method __iter__ Undocumented
Method __len__ Undocumented
Method __repr__ Undocumented
Method __setattr__ Undocumented
Method __setitem__ Change an environ value and clear all caches that depend on it.
Method ​_get​_body​_string read body until content-length or MEMFILE_MAX into a string. Raise HTTPError(413) on requests that are to large.
Method ​_iter​_body Undocumented
Method ​_iter​_chunked Undocumented
Method get Undocumented
Method keys Undocumented
Class Variable __slots__ Undocumented
Property ​_body Undocumented
Property app Bottle application handling this request.
Property auth No summary
Property body No summary
Property chunked True if Chunked transfer encoding was.
Property content​_length The request body length as an integer. The client is responsible to set this header. Otherwise, the real length of the body is unknown and -1 is returned. In this case, body will be empty.
Property content​_type The Content-Type header as a lowercase-string (default: empty).
Property cookies Cookies parsed into a FormsDict. Signed cookies are NOT decoded. Use get_cookie if you expect signed cookies.
Property files File uploads parsed from multipart/form-data encoded POST or PUT request body. The values are instances of FileUpload.
Property forms No summary
Property fullpath Request path including script_name (if present).
Property headers A WSGIHeaderDict that provides case-insensitive access to HTTP request headers.
Property is​_ajax Alias for is_xhr. "Ajax" is not the right term.
Property is​_xhr True if the request was triggered by a XMLHttpRequest. This only works with JavaScript libraries that support the X-Requested-With header (most of the popular libraries do).
Property json No summary
Property method The REQUEST_METHOD value as an uppercase string.
Property params A FormsDict with the combined values of query and forms. File uploads are stored in files.
Property path The value of PATH_INFO with exactly one prefixed slash (to fix broken clients and avoid the "empty path" edge case).
Property POST The values of forms and files combined into a single FormsDict. Values are either strings (form values) or instances of cgi.FieldStorage (file uploads).
Property query No summary
Property query​_string The raw query part of the URL (everything in between ? and #) as a string.
Property remote​_addr The client IP as a string. Note that this information can be forged by malicious clients.
Property remote​_route No summary
Property route The bottle Route object that matches this request.
Property script​_name No summary
Property url No summary
Property url​_args The arguments extracted from the URL.
Property urlparts No summary
environ =

Undocumented