Why can't I add authentication details after adding a DelegatingHandler
?
Prior to adding the DelegatingHandler
, I was able to instantiate the HttpClient
like so:
var client = new HttpClient{Credentials = ..., BaseAddress = ...};
After having added a DelegatingHandler
, I am unable to add Credentials
and BaseAddress
:
var client = new HttpClient(new RetryHandler(new HttpClientHandler()));
client.BaseAddress = // does not exist!
client.Credentials = // does not exist!
How do we add credentials and a baseaddress to this client?