We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2bc9fd9 commit 3acdceeCopy full SHA for 3acdcee
1 file changed
src/nodes/network.js
@@ -365,11 +365,13 @@
365
366
//HTTP Request
367
function HTTPRequestNode() {
368
+ var that = this;
369
this.addInput("request", LiteGraph.ACTION);
370
this.addInput("url", "string");
- this.addProperty("url", "string");
371
+ this.addProperty("url", "");
372
this.addOutput("ready", LiteGraph.EVENT);
373
this.addOutput("data", "string");
374
+ this.addWidget("button", "Fetch", null, this.fetch.bind(this));
375
this._data = null;
376
this._fetching = null;
377
}
@@ -379,6 +381,10 @@ HTTPRequestNode.desc = "Fetch data through HTTP";
379
381
380
382
HTTPRequestNode.prototype.fetch = function()
383
{
384
+ var url = this.properties.url;
385
+ if(!url)
386
+ return;
387
+
388
this.boxcolor = "#FF0";
389
var that = this;
390
this._fetching = fetch(url)
0 commit comments