【发布时间】:2021-12-31 18:29:15
【问题描述】:
将httpClient 与 XML 一起使用来发帖和接听电话的首选方式是什么?
public class ShippingService : IShippingService
{
private readonly HttpClient _httpClient;
private readonly string _remoteServiceBaseUrl;
public CatalogService(HttpClient httpClient)
{
_httpClient = httpClient;
}
public async Task<List<ShippingPrice>> GetShippingPrices()
{
// httpClient post using xml format
}
}
【问题讨论】:
-
使用
IHttpClientFactory。
标签: asp.net asp.net-core