2020-12-28 14:55:48 +08:00
|
|
|
using System.Net.Http;
|
|
|
|
|
|
|
|
|
|
namespace ServiceClient
|
|
|
|
|
{
|
|
|
|
|
public class BaseInfoHttpClient
|
|
|
|
|
{
|
|
|
|
|
private IHttpClientFactory _httpClientFactory;
|
|
|
|
|
|
|
|
|
|
internal static string _BaseUrl = "";
|
|
|
|
|
|
|
|
|
|
public string BaseUrl => _BaseUrl;
|
|
|
|
|
|
|
|
|
|
public BaseInfoHttpClient(IHttpClientFactory httpClientFactory)
|
|
|
|
|
{
|
|
|
|
|
_httpClientFactory = httpClientFactory;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public HttpClient CreateHttpClient()
|
|
|
|
|
{
|
|
|
|
|
return _httpClientFactory.CreateClient();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2020-10-07 20:25:03 +08:00
|
|
|
}
|