-
Notifications
You must be signed in to change notification settings - Fork 43
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
Overload for dependency injection that accepts IServiceProvider #103
Comments
DrLeh
added a commit
to DrLeh/DalSoft.RestClient
that referenced
this issue
Aug 11, 2021
Untested! Changes made in github web UI mostly as a guideline of suggestions. I might have gotten some of the calls to other overloads wrong as it's hard to tell without IDE
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update: see #104
There are currently no overloads in the dependency injection that allow resolving the base uri from a service.
For example, the code I have now before using this library registers an http client like so, where it resolves the base url out of a configuration object.
This gives me control to change the base url from config without having to resolve a configuration object during service collection registration.
DalSoft.RestClient/DalSoft.RestClient/DependencyInjection/ServiceCollectionExtensions.cs
Lines 24 to 35 in f8b29fb
I would propose that this file be amended to have an overload like so:
As well as other overloads for making name and headers optional.
Which would then allow a registration like so:
Thanks!
The text was updated successfully, but these errors were encountered: