Skip to content
masterclass Buddy

Requests · Error

HTTPError

Requests sends HTTP requests with simple method functions such as get() and post(). The returned Response object provides the status, headers, cookies, body, and decoded JSON.

Last updated

Syntax

requests.request(method, url, **kwargs)
requests.get(url, **kwargs)
requests.post(url, data=None, json=None, **kwargs)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Response
  • Response.raise_for_status()
  • Response.json()
  • requests.Session
  • requests.codes
  • requests.exceptions.RequestException
  • requests.exceptions.HTTPError
  • requests.exceptions.ConnectionError

Source: Quickstart — Requests 2.34.2 documentation. Checked 2026-11-03.