Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Module « flask »

Classe « Request »

Informations générales

Héritage

builtins.object
    Request
        Request
            Request

Définition

class Request(Request):

Description [extrait de Request.__doc__]

The 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.
    

Constructeur(s)

Signature du constructeur Description
__init__(self, environ: 'WSGIEnvironment', populate_request: bool = True, shallow: bool = False) -> None

Liste des attributs statiques

Nom de l'attribut Valeur
access_control_request_headers<header_property Access-Control-Request-Headers>
access_control_request_method<header_property Access-Control-Request-Method>
charsetutf-8
content_encoding<header_property Content-Encoding>
content_md5<header_property Content-MD5>
content_type<header_property Content-Type>
date<header_property Date>
disable_data_descriptorNone
encoding_errorsreplace
input_stream<environ_property wsgi.input>
is_multiprocess<environ_property wsgi.multiprocess>
is_multithread<environ_property wsgi.multithread>
is_run_once<environ_property wsgi.run_once>
json_module<module 'flask.json' from '/home/dominique/Documents/My Developpements/EclipseWorkspace/Ellipse/KooR/_ApiPython/venv/lib64/python3.10/site-packages/flask/json/__init__.py'>
max_form_memory_sizeNone
max_forwards<header_property Max-Forwards>
origin<header_property Origin>
referrer<header_property Referer>
remote_user<environ_property REMOTE_USER>
routing_exceptionNone
trusted_hostsNone
url_ruleNone
view_argsNone

Attributs statiques hérités de la classe Request

max_content_length

Liste des propriétés

Nom de la propriétéDescription
accept_charsetsList of charsets this client supports as [extrait de accept_charsets.__doc__]
accept_encodingsList of encodings this client accepts. Encodings in a HTTP term [extrait de accept_encodings.__doc__]
accept_languagesList of languages this client accepts as [extrait de accept_languages.__doc__]
accept_mimetypesList of mimetypes this client supports as [extrait de accept_mimetypes.__doc__]
access_routeIf a forwarded header exists this is a list of all ip addresses [extrait de access_route.__doc__]
argsThe parsed URL parameters (the part in the URL after the question [extrait de args.__doc__]
authorizationThe `Authorization` object in parsed form. [extrait de authorization.__doc__]
base_urlLike :attr:`url` but without the query string. [extrait de base_url.__doc__]
blueprintThe registered name of the current blueprint. [extrait de __doc__]
blueprintsThe registered names of the current blueprint upwards through [extrait de __doc__]
cache_controlA :class:`~werkzeug.datastructures.RequestCacheControl` object [extrait de cache_control.__doc__]
content_lengthThe Content-Length entity-header field indicates the size of the [extrait de content_length.__doc__]
cookiesA :class:`dict` with the contents of all cookies transmitted with [extrait de cookies.__doc__]
data
endpointThe endpoint that matched the request URL. [extrait de __doc__]
files:class:`~werkzeug.datastructures.MultiDict` object containing [extrait de files.__doc__]
formThe form parameters. By default an [extrait de form.__doc__]
full_pathRequested path, including the query string. [extrait de full_path.__doc__]
hostThe host name the request was made to, including the port if [extrait de host.__doc__]
host_urlThe request URL scheme and host only. [extrait de host_url.__doc__]
if_matchAn object containing all the etags in the `If-Match` header. [extrait de if_match.__doc__]
if_modified_sinceThe parsed `If-Modified-Since` header as a datetime object. [extrait de if_modified_since.__doc__]
if_none_matchAn object containing all the etags in the `If-None-Match` header. [extrait de if_none_match.__doc__]
if_rangeThe parsed ``If-Range`` header. [extrait de if_range.__doc__]
if_unmodified_sinceThe parsed `If-Unmodified-Since` header as a datetime object. [extrait de if_unmodified_since.__doc__]
is_jsonCheck if the mimetype indicates JSON data, either [extrait de __doc__]
is_secure``True`` if the request was made with a secure protocol [extrait de __doc__]
jsonThe parsed JSON data if :attr:`mimetype` indicates JSON [extrait de __doc__]
max_content_lengthRead-only view of the ``MAX_CONTENT_LENGTH`` config key. [extrait de __doc__]
mimetypeLike :attr:`content_type`, but without parameters (eg, without [extrait de __doc__]
mimetype_paramsThe mimetype parameters as dict. For example if the content [extrait de __doc__]
pragmaThe Pragma general-header field is used to include [extrait de pragma.__doc__]
rangeThe parsed `Range` header. [extrait de range.__doc__]
root_urlThe request URL scheme, host, and root path. This is the root [extrait de root_url.__doc__]
script_rootAlias for :attr:`self.root_path`. ``environ["SCRIPT_ROOT"]`` [extrait de __doc__]
stream
urlThe full request URL with the scheme, host, root path, path, [extrait de url.__doc__]
url_charsetThe charset that is assumed for URLs. Defaults to the value [extrait de __doc__]
url_rootAlias for :attr:`root_url`. The URL with scheme, host, and [extrait de url_root.__doc__]
user_agentThe user agent. Use ``user_agent.string`` to get the header [extrait de user_agent.__doc__]
valuesA :class:`werkzeug.datastructures.CombinedMultiDict` that [extrait de values.__doc__]
want_form_data_parsed``True`` if the request method carries content. By default [extrait de __doc__]

Liste des opérateurs

Opérateurs hérités de la classe object

__eq__, __ge__, __gt__, __le__, __lt__, __ne__

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
__enter__(self) -> 'Request'
__exit__(self, exc_type, exc_value, tb) -> None
__repr__(self) -> str
application(f: Callable[[ForwardRef('Request')], ForwardRef('WSGIApplication')]) -> 'WSGIApplication' Decorate a function as responder that accepts the request as [extrait de application.__doc__]
close(self) -> None Closes associated resources of this request object. This [extrait de close.__doc__]
from_values(*args: Any, **kwargs: Any) -> 'Request' Create a new request object based on the values provided. If [extrait de from_values.__doc__]
get_data(self, cache: bool = True, as_text: bool = False, parse_form_data: bool = False) -> Union[bytes, str] This reads the buffered incoming data from the client into one [extrait de get_data.__doc__]
get_json(self, force: bool = False, silent: bool = False, cache: bool = True) -> Optional[Any] Parse :attr:`data` as JSON. [extrait de get_json.__doc__]
make_form_data_parser(self) -> werkzeug.formparser.FormDataParser Creates the form data parser. Instantiates the [extrait de make_form_data_parser.__doc__]
on_json_loading_failed(self, e: Exception) -> 'te.NoReturn'

Méthodes héritées de la classe Request

__init_subclass__, __subclasshook__

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__