mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
fae34f8244
commit
f22cd381ee
@ -67,7 +67,11 @@ function HTTPOut(n) {
|
||||
msg.res.set(msg.headers);
|
||||
}
|
||||
var statusCode = msg.statusCode || 200;
|
||||
if (typeof msg.payload == "object" && !Buffer.isBuffer(msg.payload)) {
|
||||
msg.res.jsonp(statusCode,msg.payload);
|
||||
} else {
|
||||
msg.res.send(statusCode,msg.payload);
|
||||
}
|
||||
} else {
|
||||
node.warn("No response object");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user