Implemented post put patch and delete request
All checks were successful
Build / build (push) Successful in 40s
All checks were successful
Build / build (push) Successful in 40s
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user