Spaces:
Sleeping
Sleeping
File size: 369 Bytes
8421ec4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import requests
import time
print("Waiting for server to ensure it is up...")
time.sleep(3)
try:
url = "http://localhost:4000/chats"
print(f"Testing POST {url}...")
res = requests.post(url, json={"title": "Test Chat"})
print(f"Status: {res.status_code}")
print(f"Response: {res.text}")
except Exception as e:
print(f"Failed to connect: {e}")
|