Skip to content

Allow passing any policy on individual request done with a client #23172

Open

Description

Feature Request

Currently, all policies have to be configured on the client at creation time.
A few selected options can be passed per request, via the context.

This makes a client relatively rigid. If we need to make calls to different endpoints (hosts) but with the same client, it's impossible (without non-trivial middlewares).

Allowing to modify the policy stack, or simply append a policy for a single call on an existing client would enable greater flexibility, without adding complexity for the simple use cases.

This could be done either via the options passed to every operations, which currently is often empty

or via the same context extensions as for retry, capture, or HTTPHeaders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Azure.Corefeature-requestThis issue requires a new behavior in the product in order be resolved.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions