using System;
using System.Net.Http;
using System.Threading.Tasks;

namespace Hncore.Pass.PaymentCenter.WeiFuTong
{
    public class WeiFuTongClient
    {
        private IHttpClientFactory _httpClientFactory;
        
        public WeiFuTongClient(IHttpClientFactory httpClientFactory)
        {
            _httpClientFactory = httpClientFactory;
        }

        public HttpClient CreateHttpClient()
        {
            var httpClient = _httpClientFactory.CreateClient();

            httpClient.Timeout = TimeSpan.FromMinutes(5);

            return httpClient;
        }
        
    }
}