Skip to main content
Loading page…
Python Mastery
Chapter 27
Lesson 1 of 4
HTTP & the requests Library
Contents
Notes
Tutor
Concept
How HTTP Works
Loading activity…
Previous
1 / 9
Continue
Contents
Notes
Discussion
Tutor
28 min
9 activities
0 of 9 done
In this lesson
1
How HTTP Works
2
Your First requests Call
3
Query Parameters, Headers, and Timeouts
4
Sending POST Requests and JSON Bodies
5
Error Handling: raise_for_status and Exceptions
6
Pitfall: Forgetting the Timeout
7
Status Code Knowledge Check
8
Practice: Fetching and Parsing JSON
9
Pro Tip: Use a Session for Multiple Requests
Objectives
Learner can describe HTTP verbs and status code families
Learner can make GET and POST requests with the requests library
Learner can pass query parameters and custom headers
Learner can parse JSON responses and handle HTTP errors robustly
Chapter 27 · APIs, HTTP & Databases
HTTP & the requests Library
Consuming REST APIs & Auth
SQL & SQLite
ORMs (SQLAlchemy) & PostgreSQL
Previous: Multi-Env Testing with tox, nox & CI
Next: Consuming REST APIs & Auth