dashVectorSpace / scripts /debug_conn.py
justmotes's picture
Deploy 9-Row Benchmark (via API)
9a9f1fb verified
raw
history blame
692 Bytes
import httpx
import os
url = "https://justmotes-xvector-db-node.hf.space/collections"
headers = {"api-key": "xvector_secret_pass_123"}
print(f"Testing connection to {url}...")
try:
with httpx.Client(http2=True, verify=False) as client:
r = client.get(url, headers=headers, timeout=10)
print(f"HTTP/2 Status: {r.status_code}")
print(r.text[:200])
except Exception as e:
print(f"HTTP/2 Failed: {e}")
try:
with httpx.Client(http2=False, verify=False) as client:
r = client.get(url, headers=headers, timeout=10)
print(f"HTTP/1.1 Status: {r.status_code}")
print(r.text[:200])
except Exception as e:
print(f"HTTP/1.1 Failed: {e}")