Skip to content

Get all cookies from a client #235

Open
@oussama-gourari

Description

@oussama-gourari

Is your feature request related to a problem? Please describe.
Sometimes when a request fails due to a rnet.TimeoutError, and the request is retried (I'm using Tenacity), the same exception is raised again and again even though the network issue has been resolved.
My solution was to recreate the client before retrying a failed request every time, but that means I have to transfer the cookies from the old client instance to the new one.
Currently, the only way to get cookies from a client is using the .get_cookies(url) method, but it requires inputting a URL.

Describe the solution you'd like
A method or an attribute that returns all the cookies associated with a client.

Describe alternatives you've considered
I tried to keep track of every URL for every request the client makes, and use those URLs to get any possibly associated cookies.

Additional context
None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy