From 5bd74e49ca2851d54c4228594f88260989618cea Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Mon, 2 Jan 2023 09:39:33 +0100 Subject: [PATCH] fixup! feat(coap-request): adapt to http-request --- coap/coap-request.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coap/coap-request.js b/coap/coap-request.js index 69f437b..8fb88ba 100644 --- a/coap/coap-request.js +++ b/coap/coap-request.js @@ -171,7 +171,8 @@ module.exports = function (RED) { var payload; if (reqOpts.method !== "GET") { - payload = _constructPayload(msg, reqOpts.headers["Content-Format"]); + reqOpts.headers["content-Format"] ??= config["content-format"] + payload = _constructPayload(msg, reqOpts.headers["content-Format"]); } else if (paytoqs === "query") { try { _appendQueryParams(reqOpts, msg.payload);