From 33ba51b90d5f80a4e38dbe01e644980ac52347c4 Mon Sep 17 00:00:00 2001 From: Codex Date: Mon, 25 May 2026 03:34:43 +0000 Subject: [PATCH] fix nonblocking probe rpc payload --- scripts/gateway-outbound-nonblocking-probe.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gateway-outbound-nonblocking-probe.mjs b/scripts/gateway-outbound-nonblocking-probe.mjs index 2340d665..2beb513d 100644 --- a/scripts/gateway-outbound-nonblocking-probe.mjs +++ b/scripts/gateway-outbound-nonblocking-probe.mjs @@ -78,7 +78,7 @@ async function postRpc({ id, traceId, command }) { accept: "application/json", "content-type": "application/json" }, - body: JSON.stringify({ + body: { jsonrpc: "2.0", id, method: "hardware.invoke.shell", @@ -99,7 +99,7 @@ async function postRpc({ id, traceId, command }) { serviceId: "hwlab-cloud-api", environment: "dev" } - }) + } }); } @@ -107,7 +107,7 @@ function requestJson(url, { method, headers = {}, body }) { return new Promise((resolve, reject) => { const target = new URL(url); const client = target.protocol === "https:" ? https : http; - const payload = body ? JSON.stringify(body) : ""; + const payload = body === undefined ? "" : JSON.stringify(body); const request = client.request(target, { method, headers: {