摘要: public class HttpClientFactory { private static HttpClient _httpClient = null; static HttpClientFactory() { _httpClient = new HttpClient(new HttpClien 阅读全文
posted @ 2020-05-06 08:38 蛟十五 阅读(1272) 评论(0) 推荐(0)
摘要: private static readonly HttpClient _httpClient; private ApiLoggerOptions _config; static ApiLogger() { _httpClient = new HttpClient(); _httpClient.Tim 阅读全文
posted @ 2020-05-06 08:33 蛟十五 阅读(1521) 评论(0) 推荐(0)
摘要: 1、使用HttpClient实现basic身份认证 using (HttpClient client = new HttpClient()) { client.DefaultRequestHeaders.Authorization=new AuthenticationHeaderValue("Bas 阅读全文
posted @ 2020-05-06 08:29 蛟十五 阅读(751) 评论(0) 推荐(0)