Skip to content

Support for AddHttpClient #180

Description

@jasontaylordev

Just wondering if there is currently any way to support registration of Typed clients?
For example:

services.AddHttpClient<ICatalogService, CatalogService>();

Use IHttpClientFactory to implement resilient HTTP requests | Microsoft Docs

The implementation might look something like this:

builder.Services.Scan(scan => scan
    .FromAssemblyOf<ICatalogService>()
    .AddClasses()
    .AsImplementedInterfaces()
    .WithHttpClient());

Thanks! 🙂

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions