I found this ctor:
public class MobileOtpService : IMobileOptService
{
private readonly HttpClient _client;
public MobileOtpService(HttpClient client) // How is this injected?
{
_client = client;
}
}
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IMobileOptService, MobileOtpService>();
...
services.AddHttpClient();
}
}
I can’t find any hard-coded instantiations of MobileOtpService
, so it must just be using DI.
How is the HttpClient
injected?
Does this happen automatically because of services.AddHttpClient()
?
I can’t find any code that sets the BaseAddress
etc.