Skip to content

Expose http::Uri to layers passed to ClientBuilder::connector_layer #2842

@ivan770

Description

@ivan770

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions