Hi,
I have a tenant app that has various services that provide information about the current tenant, user, and the URLs to be used to access server resources, per tenant/user.
It's called IUriProvider.
I can see the method in DefaultODataClientFactory based on serviceRoot.
But I rather them all to be based on the underlying IHttpClientFactory's provided HttpClient.BaseAddress.
In addition, the IOdataClientFactory.CreateClient<T>, also requires a serviceRoot argument. This is unnecessary if it has already been configured, or if there is an underlying HttpClient whose BaseAddress should be used for this matter instead.
Asking for Uris all over the place which would rely on constants, is a bad habit and somewhat defies the power of DI.
Hi,
I have a tenant app that has various services that provide information about the current tenant, user, and the URLs to be used to access server resources, per tenant/user.
It's called
IUriProvider.I can see the method in
DefaultODataClientFactorybased onserviceRoot.But I rather them all to be based on the underlying
IHttpClientFactory's providedHttpClient.BaseAddress.In addition, the
IOdataClientFactory.CreateClient<T>, also requires aserviceRootargument. This is unnecessary if it has already been configured, or if there is an underlyingHttpClientwhoseBaseAddressshould be used for this matter instead.Asking for
Uris all over the place which would rely on constants, is a bad habit and somewhat defies the power of DI.