Spaces:
Sleeping
Sleeping
Download check_headers.py from Darshanpurohit/StratoTest: direct link, hf CLI and curl.
- Browser
- Download file 470 Bytes
-
https://huggingface.co/spaces/Darshanpurohit/StratoTest/resolve/main/check_headers.py
- Command line
-
hf download hf://spaces/Darshanpurohit/StratoTest/check_headers.py
-
curl -L -o check_headers.py https://huggingface.co/spaces/Darshanpurohit/StratoTest/resolve/main/check_headers.py
470 Bytes
| 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}") | |