Entries published on December 8, 2023
Don’t mock Python’s HTTPX
This is part of a series of posts I’m doing as a sort of Python/Django Advent calendar, offering a small tip or piece of information each day from the first Sunday of Advent through Christmas Eve. See the first post for an introduction.
Moving on from requests
For quite a long time, the standard recommendation for making HTTP requests in Python was the aptly-named requests
package. And you can still use requests
if you want to, but there are a couple things about it that are showing their age:
- It didn’t set up any sort of timeout by default, which …