Python requests

import requests

# GET request
r = requests.get("https://httpbin.org/get", params={"foo": "bar"}, timeout=5)
assert r.ok  # status_code < 400
assert r.status_code == 200
assert r.url == "https://httpbin.org/get?foo=bar"
r.raise_for_status()  # raise HTTPError if there's any
r.content  # content in bytes
r.text  # content in unicode
r.json()  # decoded json