Skip to content

Commit d8a4e9e

Browse files
pakerfeldtknolleary
authored andcommitted
Allow false and 0 in payload for httprequest (node-red#1334)
1 parent b3ffd33 commit d8a4e9e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nodes/core/io/21-httprequest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ module.exports = function(RED) {
135135
}
136136
var payload = null;
137137

138-
if (msg.payload && (method == "POST" || method == "PUT" || method == "PATCH" ) ) {
138+
if (typeof msg.payload !== "undefined" && (method == "POST" || method == "PUT" || method == "PATCH" ) ) {
139139
if (typeof msg.payload === "string" || Buffer.isBuffer(msg.payload)) {
140140
payload = msg.payload;
141141
} else if (typeof msg.payload == "number") {

0 commit comments

Comments
 (0)