HttpClient Based on Keyed Dependency Injection
HttpClient Based on Keyed Dependency Injection Intro In .NET 8, dependency injection introduced support for keyed services, which can be referenced in .NET 8’s KeyedService. In .NET 9, improvements were made to HttpClient’s name-based dependency injection, allowing the use of keyed services for resolution when using name-based HttpClient. Sample We can register a keyed service … Read more