From 9a0a37471e9090afd4cff2f7c513e8316053818f Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Wed, 26 Nov 2025 17:23:14 +0100 Subject: [PATCH] Add REST action handling in InvokeRecActionCommand Refactor `using` directives in `InvokeRecActionCommand.cs` to include `DigitalData.Core.Exceptions` and `System.Net.Http`. Implement logic in `InvokeRecActionCommandHandler` to handle different REST actions using `HttpClient`. Introduce a `switch` statement to process "GET", "POST", "PUT", and "DELETE" actions, with a `BadRequestException` for unsupported types. Read HTTP response content asynchronously. --- .../Commands/InvokeRecActionCommand.cs | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs b/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs index c31a367..51fe220 100644 --- a/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs +++ b/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs @@ -1,5 +1,7 @@ -using MediatR; +using DigitalData.Core.Exceptions; +using MediatR; using ReC.Application.RecActions.Queries; +using System.Net.Http; namespace ReC.Application.RecActions.Commands; @@ -18,5 +20,31 @@ public class InvokeRecActionCommandHandler(ISender sender) : IRequestHandler