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: {