Check if a URL is up before you call it.
bash
uvicorn healthprobe.app:app --port 8009
bash
curl -s -X POST http://localhost:8009/v1/probe \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}' | jq
Returns healthy (true if 2xx), status_code (HTTP code or -1 on error), latency_ms, and error (if connection failed).
bash
curl -s -X POST http://localhost:8009/v1/probe \
-H "Content-Type: application/json" \
-d '{"url": "https://slow-api.example.com", "timeout_ms": 1000}' | jq '.healthy'
Timeout range: 100ms to 30,000ms (default: 5,000ms).