Python/requests
< Python
Jump to navigation
Jump to search
import requests
from requests.exceptions import ConnectionError
try:
resp = requests.get()
if resp.status_code == 200:
pass
else:
pass
except requests.exceptions.ConnectionError as ex:
pass