Skip to content

Get access to inner client from ClientWithMiddleware? #203

@milesj

Description

@milesj

Motivations

I'm using some functions from outside of our project that require &reqwest::Client as an argument, but we're using middleware via ClientWithMiddleware, and there's no way to access the inner reqwest::Client to pass to this function.

For these functions/situations, we do not care about running the middleware, just that we are reusing the same client.

Solution

Maybe a ClientWithMiddleware.get_inner() method, or implement AsRef<Client> for ClientWithMiddleware.

Alternatives

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions