Loading page
requests.post with a timeout, then raise_for_status and read the JSON.
import requests
def submit_contact(name: str, email: str, message: str) -> dict:
response = requests.post(
"https://formivo.faizyab.me/api/f/YOUR_FORM_ID",
json={"name": name, "email": email, "message": message},
headers={"Accept": "application/json"},
timeout=10,
)
response.raise_for_status()
return response.json() # {"success": True, "leadId": "..."}201 with the new submission id. 429 responses include Retry-After.
| Symptom | Fix |
|---|---|
| SSLError | Update certifi; some corporate proxies break TLS chains. |
| Timeout | Keep the timeout at 10s and retry once with an idempotency key. |