http request node add transport validity check and warn.

This commit is contained in:
Dave Conway-Jones
2017-05-15 22:04:47 +01:00
parent 5b5f9aa01d
commit 524021f0fa
3 changed files with 11 additions and 3 deletions

View File

@@ -103,7 +103,7 @@
name: {value:""},
method:{value:"GET"},
ret: {value:"txt"},
url:{value:""},
url:{value:"",validate:function(v) { return (v.trim().length === 0) || (v.indexOf("://") === -1) || (v.trim().indexOf("http") === 0)} },
tls: {type:"tls-config",required: false}
},
credentials: {
@@ -112,6 +112,9 @@
},
inputs:1,
outputs:1,
outputLabels: function(i) {
return ({txt:"UTF8 string", bin:"binary buffer", obj:"parsed JSON object"}[this.ret]);
},
icon: "white-globe.png",
label: function() {
return this.name||this._("httpin.httpreq");