我应该如何使用 HttpClientFactory 返回一个 HttpClient 实例,其 uri 和凭据是在调用时确定的?
现有代码如下所示:
var httpClientHandler = new HttpClientHandler()
{
Credentials = new NetworkCredential(userName, password),
};
HttpClient client = new HttpClient(httpClientHandler);
client.BaseAddress = new Uri(_appSetting.ServiceURI);
慕的地8271018
动漫人物
皈依舞
相关分类