class werkzeug.Request(environ, populate_request=True, shallow=False)[source]

Full featured request object implementing the following mixins:


__init__(environ[, populate_request, shallow])
application(f) Decorate a function as responder that accepts the request as first argument.
close() Closes associated resources of this request object.
from_values(*args, **kwargs) Create a new request object based on the values provided.
get_data([cache, as_text, parse_form_data]) This reads the buffered incoming data from the client into one bytestring.
make_form_data_parser() Creates the form data parser.


accept_charsets List of charsets this client supports as CharsetAccept object.
accept_encodings List of encodings this client accepts.
accept_languages List of languages this client accepts as LanguageAccept object.
accept_mimetypes List of mimetypes this client supports as MIMEAccept object.
access_route If a forwarded header exists this is a list of all ip addresses from the client ip to the last proxy server.
args The parsed URL parameters.
authorization The Authorization object in parsed form.
base_url Like url but without the querystring See also: trusted_hosts.
cache_control A RequestCacheControl object for the incoming cache control headers.
content_encoding The Content-Encoding entity-header field is used as a modifier to the media-type.
content_length The Content-Length entity-header field indicates the size of the entity-body in bytes or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET.
content_md5 The Content-MD5 entity-header field, as defined in RFC 1864, is an MD5 digest of the entity-body for the purpose of providing an end-to-end message integrity check (MIC) of the entity-body.
content_type The Content-Type entity-header field indicates the media type of the entity-body sent to the recipient or, in the case of the HEAD method, the media type that would have been sent had the request been a GET.
cookies Read only access to the retrieved cookie values as dictionary.
date The Date general-header field represents the date and time at which the message was originated, having the same semantics as orig-date in RFC 822.
files MultiDict object containing
form The form parameters.
full_path Requested path as unicode, including the query string.
headers The headers from the WSGI environ as immutable EnvironHeaders.
host Just the host including the port if available.
host_url Just the host with scheme as IRI.
if_match An object containing all the etags in the If-Match header.
if_modified_since The parsed If-Modified-Since header as datetime object.
if_none_match An object containing all the etags in the If-None-Match header.
if_range The parsed If-Range header.
if_unmodified_since The parsed If-Unmodified-Since header as datetime object.
is_multiprocess boolean that is True if the application is served by
is_multithread boolean that is True if the application is served by
is_run_once boolean that is True if the application will be executed only
is_secure True if the request is secure.
is_xhr True if the request was triggered via a JavaScript XMLHttpRequest.
max_forwards The Max-Forwards request-header field provides a mechanism with the TRACE and OPTIONS methods to limit the number of proxies or gateways that can forward the request to the next inbound server.
method The transmission method.
mimetype Like content_type, but without parameters (eg, without charset, type etc.) and always lowercase.
mimetype_params The mimetype parameters as dict.
path Requested path as unicode.
pragma The Pragma general-header field is used to include implementation-specific directives that might apply to any recipient along the request/response chain.
query_string The URL parameters as raw bytestring.
range The parsed Range header.
referrer The Referer[sic] request-header field allows the client to specify, for the server’s benefit, the address (URI) of the resource from which the Request-URI was obtained (the “referrer”, although the header field is misspelled).
remote_addr The remote address of the client.
remote_user If the server supports user authentication, and the script is protected, this attribute contains the username the user has authenticated as.
scheme URL scheme (http or https).
script_root The root path of the script without the trailing slash.
stream The stream to read incoming data from.
url The reconstructed current URL as IRI.
url_charset The charset that is assumed for URLs.
url_root The full URL root (with hostname), this is the application root as IRI.
user_agent The current user agent.
values Combined multi dict for args and form.
want_form_data_parsed Returns True if the request method carries content.