1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add HEAD to list of methods with no body in http req node

This commit is contained in:
Nick O'Leary 2018-01-31 23:54:06 +00:00
parent 3ec35ed119
commit 55a33bc408
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -135,7 +135,7 @@ module.exports = function(RED) {
} }
var payload = null; var payload = null;
if (method !== 'GET' && typeof msg.payload !== "undefined") { if (method !== 'GET' && method !== 'HEAD' && typeof msg.payload !== "undefined") {
if (typeof msg.payload === "string" || Buffer.isBuffer(msg.payload)) { if (typeof msg.payload === "string" || Buffer.isBuffer(msg.payload)) {
payload = msg.payload; payload = msg.payload;
} else if (typeof msg.payload == "number") { } else if (typeof msg.payload == "number") {