Expose `http::Uri` to layers passed to `ClientBuilder::connector_layer`
Author: ivan770Created Oct 20, 2025Updated Jul 16, 2026
Hi.
I'm currently trying to create a layer that performs some actions depending on the request URL. As the HTTP client itself is passed to different application components, I find it handy that connector_layer can serve as a single filtering entrypoint for all components.
For now, connector_layer is mostly limited to scenarios where access to the URL is not required (timeouts, concurrency limits, etc.), since a private, Unnameable type is passed to services as a request.
Would it be possible to expose the URL to external users? Even renaming Unnameable to LayerRequest and providing a method like fn url(&self) -> &http::Uri would be helpful, as the URL would be exposed only for reading.
Source: seanmonstar/reqwest