How to use AddHttpClient in .NET 6 Worker Service

Viewed 1242

Is there an alternative way to add the "AddHttpClient()" setting in the .NET 6 Worker Service template?

In Minimal APIs for example we have available:

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddHttpClient();

In the Worker Service template is not:

enter image description here

1 Answers
Related