Implemented post put patch and delete request
All checks were successful
Build / build (push) Successful in 40s

This commit is contained in:
Ankitkumar Satapara
2026-04-29 14:29:21 +05:30
parent 7d0b7c3009
commit a9a3c385eb
2 changed files with 58 additions and 7 deletions

View File

@@ -683,7 +683,19 @@ namespace Nodify.Calculator.Execution.Handlers
? apiVm.OperationType?.ToLower() ?? "get"
: "get";
var res = ctx.Executor.GetResponsePublic(url, httpMethod);
// Read the request body if present (POST/PUT/PATCH have a Body input — Square/Grid)
string body = null;
var bodyInput = node.Input.FirstOrDefault(i =>
(i.Title ?? "").StartsWith("Body", StringComparison.OrdinalIgnoreCase)
&& i.Shape != ConnectorShape.Triangle);
if (bodyInput != null)
{
body = ctx.ReadInput(bodyInput);
if (!string.IsNullOrWhiteSpace(body))
ctx.Log($"[API] Request body: {(body.Length > 150 ? body.Substring(0, 150) + "..." : body)}");
}
var res = ctx.Executor.GetResponsePublic(url, httpMethod, body);
if (!string.IsNullOrEmpty(res))
{
ctx.Outputs[node.NodeId] = res;