I'm trying to create a typed http client in an Azure function through DI, when I set it like below, it is not getting into the lambda and therefore is not setting the BaseAddress.
builder.Services.AddSingleton<IService, Service>();
builder.Services.AddHttpClient<IService, Service>(client => {
client.BaseAddress = new Uri("http://www.google.com");
});
In the service that will create the methods for the client, it consumes like so:
public Service(HttpClient client){
Then in other classes I'm injecting in Startup as:
public AClass(Service service){
I'm following the official doc, what could be wrong?