Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Improve the Request Add Timeout to request

import requests
 
url = 'http://httpbin.org/basic-auth/user/pass'
 
try:
    response = requests.get(url, timeout=0.1)
except Exception as e:
    print(e)
    
print(response.status_code)
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Improve #Request #Add #Timeout #request
ADD COMMENT
Topic
Name
9+2 =