httpx middleware #3392
|
I want to use httpx along with my custom middleware. Currently, I need middleware for logging (after receiving a response) and authentication (after sending a request). In the future, I might also need one for SSL. I realized that I can’t use event_hooks because they don’t allow me to add anything to the headers. Is there an approach similar to request-middleware that would work for this? |
Answered by
lovelydinosaur
Nov 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try taking a look at custom transports, perhaps?
They'll let you do pretty much any customisation of the request-response cycle.
There's a similar discussion here... #3073