http-rs / surf

Fast and friendly HTTP client framework for async Rust
https://docs.rs/surf
Apache License 2.0
1.46k stars 119 forks source link

Is there an event hook function that is called after a request is fully prepared? #361

Open TomeSq opened 8 months ago

TomeSq commented 8 months ago

Thank you for allowing us to use your wonderful library.

Please let me know if you know of any of the following functions

Is there an event hook function that is called just before sending a request, like the event hooks in python's httpx library? When sending a request, we need to add a signature computed from the header and body of the request packet. https://www.python-httpx.org/advanced/#event-hooks

I can't rewrite the request in Middleware because the request is not mut.

Fishrock123 commented 8 months ago

Surf's Middleware system is it's only "event hook like" system.