Also called: httpx, HTTP, API
In plain English
Always set a timeout, otherwise a hanging server hangs your script forever.
Example
requests.get with a 15-second timeout fetches the listings from the API.
In code
import requests
r = requests.get("https://api.example.com/listings", params={"city": "Ubud"}, timeout=15)
r.raise_for_status()
items = r.json()
httpx is a newer alternative that also does async.
Learn more
- Requests quickstartrequests.readthedocs.io (opens in a new tab)
- HTTPXpython-httpx.org (opens in a new tab)
Related terms
Added 2026-11-30 · Last reviewed 2026-11-30