"AddRestEaseClient" could register multiple interfaces for the same configuration?
See original GitHub issueHi,
Is there a way that AddRestEaseClient
could register multiple interfaces, something like:
.AddRestEaseClientMultiple()
.Add<IAdminClient>()
.Add<IStorePublic>()
// all having the same configuration
.Close() // now returns to IHttpClientBuilder
.ConfigureHttpClient((service, client) => client.BaseAddress = Program.basePath)
.AddHttpMessageHandler<BaseAddressAuthorizationMessageHandler>();
Thank you for your time
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to register a service with multiple interfaces in ASP. ...
In this post I describe how to register a concrete class with multiple public interfaces in the Microsoft.Extensions.
Read more >RestEase
At some point, I'd like to move to RestEase 2. There are two main ... "AddRestEaseClient" could register multiple interfaces for the same...
Read more >Register same implementation for multiple interfaces
I end up with two instances that could be resolved using IAwesome<Thing> and IAwesomeThing , which allows to run 2*N operations. I definitely ......
Read more >Multiple implementations of same interface - the options
Different methods of registering the same interface with multiple implementations using .NET dependency injection · The challenge · The problem ...
Read more >RestEase 1.5.2
Easy-to-use typesafe REST API client library, which is simple and customisable. Write a C# interface which describes your API, and RestEase ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Reopening, as I think this is probably something worth implementing.
This issue won’t be relevant to you if you’re configuring a RestEase interface after constructing it, before returning it. It’s just about if you’re using HttpClientFactory and IServiceProvider.
If you’ve got other questions, please open another issue. Thanks!