Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Timeout requests #23

Closed
DavidWells opened this issue May 2, 2020 · 3 comments
Closed

How to Timeout requests #23

DavidWells opened this issue May 2, 2020 · 3 comments

Comments

@DavidWells
Copy link

Hey there!

How do I timeout requests?

I can't get this to work:

const httpsResp = await get(httpsUrl, { timeout: 2000 })

It looks like #17 wasn't merged in.

@lukeed
Copy link
Owner

lukeed commented May 2, 2020

Hey,

What version are you using? The timeout option only exists in the @next version and is available across all 3 modes

@DavidWells
Copy link
Author

I'm on "httpie": "^1.1.2",

So npm install httpie@next will have timeout? 😃

@lukeed
Copy link
Owner

lukeed commented May 3, 2020

Yup! For browser & Node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants