update quality

This commit is contained in:
2026-02-11 02:12:03 +03:00
parent 091565f020
commit e4c3d7afb1
18 changed files with 1036 additions and 564 deletions

View File

@@ -58,4 +58,14 @@ public class Calculator
return new { Result = result };
}
public object Reset(string @operator, object[] args)
{
// Return default inputs (operator = "add", args = [0, 0])
return new
{
@operator = "add",
args = new decimal[] { 0, 0 }
};
}
}

View File

@@ -1,6 +1,7 @@
using System.Diagnostics;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
namespace S8n.Components.Basics;
@@ -30,7 +31,7 @@ public class HttpRequest
return "http://" + url;
}
public object Execute(string method, string url, Dictionary<string, string>? headers = null, object? body = null)
public async Task<object> Execute(string method, string url, Dictionary<string, string>? headers = null, object? body = null)
{
if (string.IsNullOrWhiteSpace(url))
{
@@ -77,11 +78,11 @@ public class HttpRequest
}
// Execute request
using var response = _httpClient.SendAsync(request).GetAwaiter().GetResult();
using var response = await _httpClient.SendAsync(request);
stopwatch.Stop();
// Read response content
var responseContent = response.Content.ReadAsStringAsync().GetAwaiter().GetResult();
var responseContent = await response.Content.ReadAsStringAsync();
// Extract response headers
var responseHeaders = new Dictionary<string, string>();