Closed DrLeh closed 2 years ago
@DrLeh thanks for reporting. I will get to this and the PR soon.
Hi @DrLeh . I thought you might like to know that I finally addressed the issue you logged here. I used part of your unit test from another branch, but I did not follow the same path to fix the issue. You can see how the problem was solved here:
Update: see #99
This method doesn't pass the service provider to the action, meaning I cannot reference any other services during my registration.
https://github.com/MelbourneDeveloper/RestClient.Net/blob/87b0ffc75cec41bc39f68b22153b9dd5315cd747/src/RestClient.Net.DependencyInjection/RestClientExtensions.cs#L10-L28
For example, before using this package I register an http client like so:
Since I use the
IServiceProvider sp
to get the configuration for the url, i'm not able to register my provider with RestClient.Net. This is useful because when deploying code to dev environment, i want to configure it to talk to other apis in that environment.Here's what I envision this code looking like:
Thanks!