From 1fc45702106ec161ba1aeb20eae1de629d8945d5 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 5 Dec 2025 22:45:19 +0100 Subject: [PATCH] Add ReCClient class and update project dependencies Added `ReCClient` class to handle HTTP requests with JSON serialization/deserialization support. Updated `ReC.Client.csproj` to include `System.Net.Http` (v4.3.4) and `System.Text.Json` (v9.0.11) as package references. Introduced conditional `using` directives for `NETFRAMEWORK` compatibility. --- src/ReC.Client/ReC.Client.csproj | 5 +++++ src/ReC.Client/ReCClient.cs | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 src/ReC.Client/ReCClient.cs diff --git a/src/ReC.Client/ReC.Client.csproj b/src/ReC.Client/ReC.Client.csproj index 983eb2b..6b41f2e 100644 --- a/src/ReC.Client/ReC.Client.csproj +++ b/src/ReC.Client/ReC.Client.csproj @@ -8,4 +8,9 @@ enable enable + + + + + diff --git a/src/ReC.Client/ReCClient.cs b/src/ReC.Client/ReCClient.cs new file mode 100644 index 0000000..99165a7 --- /dev/null +++ b/src/ReC.Client/ReCClient.cs @@ -0,0 +1,22 @@ +using System.Text.Json; +#if NETFRAMEWORK +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +#else +#endif + +namespace ReC.Client +{ + public class ReCClient + { + private readonly HttpClient _http; + private readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions() { PropertyNameCaseInsensitive = true }; + + public ReCClient(HttpClient http) + { + _http = http ?? throw new ArgumentNullException(nameof(http)); + } + } +}