Spaces:
Sleeping
Sleeping
File size: 470 Bytes
d7171f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import requests
try:
url = "http://localhost:8000"
response = requests.get(url, timeout=5)
print(f"Status: {response.status_code}")
print(f"Headers: {response.headers}")
except Exception as e:
print(f"Error on 8000: {e}")
try:
url = "http://localhost:8001"
response = requests.get(url, timeout=5)
print(f"Status: {response.status_code}")
print(f"Headers: {response.headers}")
except Exception as e:
print(f"Error on 8001: {e}")
|