public HttpClientWrapper(IHttpRequest request) { _client = request.GetAsyncInvoker(); _shouldDicpose = false; if (_client == null) { _shouldDicpose = true; _client = HttpClientProvider.GetClient(request.Proxy); } }
/// <summary> /// 获取一个用于异步请求的 /// </summary> HttpMessageInvoker IHttpRequest.GetAsyncInvoker() => _client ?? (_client = HttpClientProvider.GetClient(Proxy));