Files
cultivation-world-simulator/debug_client.py
bridge bfefb97ea2 temp
2025-11-20 01:21:32 +08:00

14 lines
367 B
Python

import urllib.request
import json
try:
with urllib.request.urlopen("http://localhost:8000/api/state") as response:
print(f"Status: {response.status}")
print(response.read().decode('utf-8'))
except urllib.error.HTTPError as e:
print(f"HTTP Error: {e.code}")
print(e.read().decode('utf-8'))
except Exception as e:
print(f"Error: {e}")