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? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Try taking a look at custom transports, perhaps? There's a similar discussion here... #3073 |
Beta Was this translation helpful? Give feedback.
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