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

Fix HTTTP Request url template

This commit is contained in:
Nick O'Leary 2014-04-20 20:50:20 +01:00
parent eee8f89146
commit 729036ec0b

View File

@ -138,6 +138,7 @@ function HTTPRequest(n) {
var node = this;
var credentials = RED.nodes.getCredentials(n.id);
this.on("input",function(msg) {
var url;
if (msg.url) {
url = msg.url;
} else if (isTemplatedUrl) {
@ -145,7 +146,6 @@ function HTTPRequest(n) {
} else {
url = nodeUrl;
}
var url = msg.url||nodeUrl;
var method = (msg.method||nodeMethod).toUpperCase();
var opts = urllib.parse(url);
opts.method = method;