temp
This commit is contained in:
13
debug_client.py
Normal file
13
debug_client.py
Normal file
@@ -0,0 +1,13 @@
|
||||
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}")
|
||||
|
||||
Reference in New Issue
Block a user