U a@sddlZddlmZddlmZddlmZddl m Z ddl m Z ddl mZejrjddlZdd lmZGd d d eZGd d d eZdS)N) BadRequest)Request)Response)json) current_app)_split_blueprint_path)Rulec@seZdZUdZeZdZejde d<dZ ejej e ej fe d<dZejee d<eejeddd Zeeje dd d Zeeje dd d Zeeje dddZddddZeddddZdS)raThe request object used by default in Flask. Remembers the matched endpoint and view arguments. It is what ends up as :class:`~flask.request`. If you want to replace the request object used you can subclass this and set :attr:`~flask.Flask.request_class` to your subclass. The request object is a :class:`~werkzeug.wrappers.Request` subclass and provides all of the attributes Werkzeug defines plus a few Flask specific ones. Nr url_rule view_argsrouting_exceptionreturncCstrtjdSdSdS)z8Read-only view of the ``MAX_CONTENT_LENGTH`` config key.ZMAX_CONTENT_LENGTHN)rconfigselfrOC:\Users\vtejo\AppData\Local\Temp\pip-unpacked-wheel-e702oxwa\flask\wrappers.pymax_content_length5s zRequest.max_content_lengthcCs|jdk r|jjSdS)aThe endpoint that matched the request URL. This will be ``None`` if matching failed or has not been performed yet. This in combination with :attr:`view_args` can be used to reconstruct the same URL or a modified URL. N)r endpointrrrrr=s zRequest.endpointcCs(|j}|dk r$d|kr$|ddSdS)ajThe registered name of the current blueprint. This will be ``None`` if the endpoint is not part of a blueprint, or if URL matching failed or has not been performed yet. This does not necessarily match the name the blueprint was created with. It may have been nested, or registered with a different name. N.r)r rpartition)rrrrr blueprintLs zRequest.blueprintcCs|j}|dkrgSt|S)zThe registered names of the current blueprint upwards through parent blueprints. This will be an empty list if there is no current blueprint, or if URL matching failed. .. versionadded:: 2.0.1 N)rr)rnamerrr blueprints_s zRequest.blueprintscCs<t|tr8tjr8|jdkr8|js8ddlm}||dS)Nzmultipart/form-datar)attach_enctype_error_multidict) RequestBase_load_form_datardebugmimetypefilesZ debughelpersr)rrrrrrps  zRequest._load_form_dataz te.NoReturn)ercCs"trtjrtd|tdS)NzFailed to decode JSON object: )rrr)rr!rrron_json_loading_faileds zRequest.on_json_loading_failed)__name__ __module__ __qualname____doc__r json_moduler tOptional__annotations__r DictstrAnyr ExceptionpropertyintrrrListrrr"rrrrrs   rcs2eZdZdZdZeZeedfdd Z Z S)raThe response object that is used by default in Flask. Works like the response object from Werkzeug but is set to have an HTML mimetype by default. Quite often you don't have to create this object yourself because :meth:`~flask.Flask.make_response` will take care of that for you. If you want to replace the response object used you can subclass this and set :attr:`~flask.Flask.response_class` to your subclass. .. versionchanged:: 1.0 JSON support is added to the response, like the request. This is useful when testing to get the test client response data as JSON. .. versionchanged:: 1.0 Added :attr:`max_cookie_size`. z text/htmlr cstrtjdStjS)zRead-only view of the :data:`MAX_COOKIE_SIZE` config key. See :attr:`~werkzeug.wrappers.Response.max_cookie_size` in Werkzeug's docs. ZMAX_COOKIE_SIZE)rrsupermax_cookie_sizer __class__rrr3s zResponse.max_cookie_size) r#r$r%r&Zdefault_mimetyperr'r/r0r3 __classcell__rrr4rrs r)typingr(Zwerkzeug.exceptionsrZwerkzeug.wrappersrrrZ ResponseBaserglobalsrZhelpersr TYPE_CHECKINGZtyping_extensionsteZwerkzeug.routingr rrrrs       v