Multiple AddHttpClient with different API endpoints #2613
Answered
by
dansiegel
memis1970
asked this question in
Xamarin.Forms
-
Hi, I have a Xamarin Forms app using Prism with the following packages: Prism.Forms.Extended Prism.Unity.Extensions I'm trying to register 2 different APIs using HttpClientFactory as follows:
...but onyl one Base Address is being set. It sets the base address fine in there is only one AddHttpClient call. Any ideas why this would be and how to remedy? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Answered by
dansiegel
Nov 9, 2021
Replies: 1 comment 2 replies
-
Unity does not support the concept of: container.Register<IService, ImplementationA>();
container.Register<IService, ImplementationB>();
container.Resolve<IEnumerable<IService>>(); As I recall this would be required for the HttpClientFactory. If you use DryIoc instead it should work. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
memis1970
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unity does not support the concept of:
As I recall this would be required for the HttpClientFactory. If you use DryIoc instead it should work.