Skip to content

Instantly share code, notes, and snippets.

@dg3feiko
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dg3feiko/c4d3dd6a5bc2a02a128a to your computer and use it in GitHub Desktop.
Save dg3feiko/c4d3dd6a5bc2a02a128a to your computer and use it in GitHub Desktop.
function getFile(url) // returns a promise
{
return Promise.delay(3000) //Promise.delay() returns a promise
.then(function(){
return http.download('url') // http.download returns a promise
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment