From b190e4f5e939df5e35978c4fae331e27ea3919b4 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 5 Dec 2025 23:36:45 +0100 Subject: [PATCH] Update InvokeRecActionAsync to return success status The method `InvokeRecActionAsync` in the `ReC.Client` namespace was updated to return a `bool` instead of `Task`. This change allows the method to indicate whether the HTTP request was successful. - Updated the return type from `Task` to `Task`. - Modified the `` XML documentation to reflect the new behavior. - Replaced `resp.EnsureSuccessStatusCode()` with `resp.IsSuccessStatusCode` to return the success status directly. --- src/ReC.Client/ReCClient.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ReC.Client/ReCClient.cs b/src/ReC.Client/ReCClient.cs index 3482e14..b87c011 100644 --- a/src/ReC.Client/ReCClient.cs +++ b/src/ReC.Client/ReCClient.cs @@ -24,11 +24,11 @@ namespace ReC.Client /// /// /// - /// - public async Task InvokeRecActionAsync(int profileId, CancellationToken cancellationToken = default) + /// True if the request was successful, false otherwise + public async Task InvokeRecActionAsync(int profileId, CancellationToken cancellationToken = default) { var resp = await _http.PostAsync($"api/RecAction/invoke/{profileId}", content: null, cancellationToken); - resp.EnsureSuccessStatusCode(); + return resp.IsSuccessStatusCode; } } } \ No newline at end of file