Last active
January 19, 2016 23:35
-
-
Save cacheflow/38ed4cfbe34598e9b898 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fetch = require('node-fetch'); | |
var url = "running before everything else"; | |
fetch('https://api.github.com/users/jmsevold') | |
.then(function(res) { | |
return res.json(); | |
}).then(function(result) { | |
url = result.followers_url | |
return url; | |
}).then(function(url){ | |
fetch(url).then(function(res){ | |
return res.json(); | |
}).then(function(json){ | |
url = json; | |
console.log("this is the json data stored in the url being called later", url); | |
return json; | |
}).catch(function (error) { | |
console.log(error); | |
}); | |
}).catch(function (error) { | |
console.log(error); | |
}); | |
console.log(url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment