http-rs / http-rs/surf

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

Open
#361 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.5k
Forks
128
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Middleware API and the request-sending path to determine whether a hook runs after the request is fully prepared but before transmission. Check how headers and the body are exposed at that point, and document whether the existing API supports signing or what lifecycle behavior would need to be added.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.