From d8a4e9e1ab602cb7236eb74b561de2c2826050fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C3=85kerfeldt?= Date: Sun, 9 Jul 2017 13:17:54 +0200 Subject: [PATCH] Allow false and 0 in payload for httprequest (#1334) --- nodes/core/io/21-httprequest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/core/io/21-httprequest.js b/nodes/core/io/21-httprequest.js index cd13824ae..24e7eea18 100644 --- a/nodes/core/io/21-httprequest.js +++ b/nodes/core/io/21-httprequest.js @@ -135,7 +135,7 @@ module.exports = function(RED) { } var payload = null; - if (msg.payload && (method == "POST" || method == "PUT" || method == "PATCH" ) ) { + if (typeof msg.payload !== "undefined" && (method == "POST" || method == "PUT" || method == "PATCH" ) ) { if (typeof msg.payload === "string" || Buffer.isBuffer(msg.payload)) { payload = msg.payload; } else if (typeof msg.payload == "number") {