Skip to content

feature: Have the possibility to setup Polly Context #801

@andrekiba

Description

@andrekiba

Hello and thanks in advance!
What about the case in which Polly and Refit are used with HttpClientFactory?
For example: is there a way to setup the Polly Context before each call with Refit?
https://github.com/App-vNext/Polly/wiki/Keys-And-Context-Data
I didn't find a way to manage this.
In Controllers for example you inject the refit-generated interface (and it is amazing) but at this point you can't setup the Context because you can't access the underlying http request.
Polly provides the request.SetPolicyExecutionContext(context); but we can't use it.
https://github.com/App-vNext/Polly/wiki/Polly-and-HttpClientFactory#use-case-exchanging-information-between-policy-execution-and-calling-code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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