diff --git a/src/ReC.Client/ReC.Client.csproj b/src/ReC.Client/ReC.Client.csproj index 6b41f2e..0b561b9 100644 --- a/src/ReC.Client/ReC.Client.csproj +++ b/src/ReC.Client/ReC.Client.csproj @@ -10,6 +10,7 @@ + diff --git a/src/ReC.Client/ReCClient.cs b/src/ReC.Client/ReCClient.cs index e680b72..e314da5 100644 --- a/src/ReC.Client/ReCClient.cs +++ b/src/ReC.Client/ReCClient.cs @@ -1,4 +1,6 @@ using System.Text.Json; +using System.Xml.Linq; + #if NETFRAMEWORK using System; using System.Net.Http; @@ -14,9 +16,9 @@ namespace ReC.Client private readonly HttpClient _http; private readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions() { PropertyNameCaseInsensitive = true }; - public ReCClient(HttpClient http) + public ReCClient(IHttpClientFactory httpClientFactory) { - _http = http ?? throw new ArgumentNullException(nameof(http)); + _http = httpClientFactory.CreateClient(); } ///