Closed
Description
Is there a way to download multiple files, using promises.
Instead of this:
repos.contents("master", /path/to/a.json, function(error, result){})
repos.contents("master", /path/to/b.json, function(error, result){})
repos.contents("master", /path/to/c.json, function(error, result){})
How about doing this instead:
var a = make_promise("GET", "json", "/path/to/a.json");
var b = make_promise("GET", "json", "/path/to/b.json");
var c = make_promise("GET", "json", "/path/to/c.json");
Promise.all([a,b,c])
.then(function(response)
{
},
function()
{
});
Metadata
Metadata
Assignees
Labels
No labels