用于将该url写入日志,便于出问题时提供排查线索
private static readonly HttpClient _httpClient = new HttpClient() { BaseAddress = new Uri("http://A") };//... var response = await _httpClient.GetAsync($"B"); _logger.LogInformation($"Requesting {url}");
上面代码中url的值如何从_httpClient中获取?
相关分类