Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added methods to support creating RefitSettings using the service provider #1112

Merged

Conversation

david-driscoll
Copy link
Contributor

What kind of change does this PR introduce?
Feature

What is the current behavior?
Currently it is not possible to influence refit settings using other services in the IServiceProvider and everything must be know ahead of time. This isn't always ideal or possible.

What is the new behavior?
Two new overloads have been added to AddRefitClient that take Func<IServiceProvider, RefitSettings?>? settingsAction. This is resolved as a singleton when requesting the other related services.

What might this PR break?
Hopefully nothing! Unit tests have been added that cover the new functionality as well as the existing functionality, ensuring that all the services are registered as expected, and the typed service client can properly be resolved.

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:
Fixes: #903

@clairernovotny clairernovotny merged commit 33935a9 into reactiveui:main Mar 19, 2021
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: Refit.HttpClientFactory AddRefitClient with service provider
2 participants