mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
new-style callback function (http response node)
This commit is contained in:
parent
77bd7541ca
commit
4f3a6821d1
@ -281,7 +281,7 @@ module.exports = function(RED) {
|
|||||||
var node = this;
|
var node = this;
|
||||||
this.headers = n.headers||{};
|
this.headers = n.headers||{};
|
||||||
this.statusCode = n.statusCode;
|
this.statusCode = n.statusCode;
|
||||||
this.on("input",function(msg) {
|
this.on("input",function(msg,_send,done) {
|
||||||
if (msg.res) {
|
if (msg.res) {
|
||||||
var headers = RED.util.cloneMessage(node.headers);
|
var headers = RED.util.cloneMessage(node.headers);
|
||||||
if (msg.headers) {
|
if (msg.headers) {
|
||||||
@ -347,6 +347,7 @@ module.exports = function(RED) {
|
|||||||
} else {
|
} else {
|
||||||
node.warn(RED._("httpin.errors.no-response"));
|
node.warn(RED._("httpin.errors.no-response"));
|
||||||
}
|
}
|
||||||
|
done();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
RED.nodes.registerType("http response",HTTPOut);
|
RED.nodes.registerType("http response",HTTPOut);
|
||||||
|
Loading…
Reference in New Issue
Block a user