Tags » python » httpx
-
TIL: How to simulate an
[Errno 54] Connection reset by peer
when using pytestYou can run a TCP server in the background using a fixture, and using the
SO_LINGER
socket option can reset the connection. -
TIL: Checking if a URL has changed when you fetch it over HTTP
When you make an HTTP request, you can use the
If-Modified-Since
header to get a 304 Not Modified if nothing has changed since your last request.