136c2fcb302528af561a9fbc0a567275c14f0300
Introduced the `EnsureSuccessAsync` method in `ReCClientHelpers.cs` to handle HTTP response validation asynchronously. This method throws a `ReCApiException` for non-success status codes, including detailed error information such as status code, reason phrase, HTTP method, URI, and response body (if available). Updated `using` directives to support asynchronous operations and cancellation tokens. Removed redundant `#if NETFRAMEWORK` directive around `using System.Net.Http;` and adjusted `using System.Net.Http.Json;` placement for consistency. Added exception handling for response body read failures to ensure status information is still propagated. Enhanced error reporting for failed HTTP requests.
Description
Languages
C#
100%