question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No way to add timeout to request

See original GitHub issue

I run into this code locking up if API endpoint are not available. requests.get() supports timeout parameter, but it is not used and I see no way to set it.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lukaskubiscommented, Jan 13, 2018

I’m on it

0reactions
mlasevichcommented, Jan 14, 2018

LOL. I did test it by manually adding the , in local install and timeout functionality worked great. Will retest with the new version, but can’t imagine it would be any different 😃

Thanks again!

(Update, 0.3.91 worked great)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Timeouts in Python requests - Datagy
By default, the Python requests library does not set a timeout for any request it sends. This is true for GET , POST...
Read more >
How to Timeout a fetch() Request - Dmitri Pavlutin
A good approach when making network requests is to configure a request timeout of about 8 - 10 seconds. As shown in the...
Read more >
No way to set the request timeout when using the JavaHttpClient
Since it is a request timeout: add it to the request. It seems to me that this solution is not on the table....
Read more >
Timeout for python requests.get entire response - Stack Overflow
Set the timeout parameter: r = requests.get(w, verify=False, timeout=10) # 10 seconds. Changes in version 2.25.1.
Read more >
Setting a Request Timeout for a Spring REST API - Baeldung
One way we can implement a request timeout on database calls is to take advantage of Spring's @Transactional annotation. It has a timeout...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found