Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Is it possible to set a timeout? #157

Open

Description

@dkvdm

I've noticed that coreapi uses requests to handle all of the http requests, but it doesn't seem like there is an easy way to access this for client.get and client.action.

Any idea how I can set a timeout for this? Much obliged!

Activity

  1. lovelydinosaur commented on Feb 14, 2018

    @lovelydinosaur
    Contributor

    It'd make sense to build this in, yup.
    Is it possible to set the timeout on the Session? (You can provide a custom session to the client)

  2. added this to the 3.0 milestone on Feb 14, 2018
  3. dkvdm commented on Feb 15, 2018

    @dkvdm
    Author

    Hmmm, not a bad idea Tom, for now I'll provide a custom Requests Session to the client.
    Granted, I'm using coreapi for a variety of users with a pre-instantiated coreapi.Client and I don't want them to share the same Session to prevent contamination...any suggestions on instantiating? Much obliged!

  4. lovelydinosaur commented on Feb 15, 2018

    @lovelydinosaur
    Contributor

    Not quite sure what you mean. I'd guess you could instantiate a different client for each user, or have a custom session instance that delegates the send to different sub instances depending on the user credentials. (Sounds more complicated than you probably actually need.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions