How to use ConfigurePrimaryHttpMessageHandler generic
问题 I want to add an HttClientHandler for a Typed HttpClient in order to include certificate authentication. All the examples I'm finding on the internet are like this: services.AddHttpClient<IMyService, MyService>() .ConfigurePrimaryHttpMessageHandler(() => { return new HttpClientHandler() { // Set here whatever you need to get configured }; }); But I don't want to include all the logic to obtain the certificate here, so I would like to use the generic version of