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 :

Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé
Classe « Client »

Méthode flask.testing.Client.open

Signature de la méthode open

def open(self, *args: 't.Any', buffered: 'bool' = False, follow_redirects: 'bool' = False, **kwargs: 't.Any') -> 'TestResponse' 

Description

help(Client.open)

Generate an environ dict from the given arguments, make a
request to the application using it, and return the response.

:param args: Passed to :class:`EnvironBuilder` to create the
    environ for the request. If a single arg is passed, it can
    be an existing :class:`EnvironBuilder` or an environ dict.
:param buffered: Convert the iterator returned by the app into
    a list. If the iterator has a ``close()`` method, it is
    called automatically.
:param follow_redirects: Make additional requests to follow HTTP
    redirects until a non-redirect status is returned.
    :attr:`TestResponse.history` lists the intermediate
    responses.

.. versionchanged:: 2.1
    Removed the ``as_tuple`` parameter.

.. versionchanged:: 2.0
    The request input stream is closed when calling
    ``response.close()``. Input streams for redirects are
    automatically closed.

.. versionchanged:: 0.5
    If a dict is provided as file in the dict for the ``data``
    parameter the content type has to be called ``content_type``
    instead of ``mimetype``. This change was made for
    consistency with :class:`werkzeug.FileWrapper`.

.. versionchanged:: 0.5
    Added the ``follow_redirects`` parameter.


Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les fondamentaux
Voir le programme détaillé