Created
October 9, 2015 14:26
-
-
Save xiyoulaoyuanjia/6b672b6abc4dc3cc967f to your computer and use it in GitHub Desktop.
Timeout for python requests.get entire response
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import eventlet | |
eventlet.monkey_patch() | |
with eventlet.Timeout(10): | |
requests.get("http://ipv4.download.thinkbroadband.com/1GB.zip", verify=False) | |
##### r = requests.get("get("http://ipv4.download.thinkbroadband.c", verify=False, timeout=10) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment