It would be helpful if the requests library provided an easy and consistent way to log every outgoing request and incoming response without manually wrapping or subclassing Session objects.
Motivation
Many developers (especially in production systems, microservices, and debugging tools) need to:
Trace outgoing requests (URLs, methods, headers, payloads)
Log response details (status code, latency, headers, etc.)
Integrate logs with frameworks like logging, structlog, or jsonlogger
It would be helpful if the requests library provided an easy and consistent way to log every outgoing request and incoming response without manually wrapping or subclassing Session objects.
Motivation
Many developers (especially in production systems, microservices, and debugging tools) need to:
Trace outgoing requests (URLs, methods, headers, payloads)
Log response details (status code, latency, headers, etc.)
Integrate logs with frameworks like logging, structlog, or jsonlogger