Created
January 22, 2020 13:11
-
-
Save erperejildo/835ae2e8ea2356a0d29f0804a50520ea to your computer and use it in GitHub Desktop.
This file contains 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
// try this online: https://codepen.io/Xiwi/pen/jOEXJRa?editors=0010 | |
// (don't forget to open the console) | |
const getData = function(url) { | |
axios.get(url) | |
.then(function(response){ | |
let follow = response.data.follow; | |
if (follow) { | |
follow = follow.replace('challenge?', 'challenge.json?'); | |
console.log(follow); | |
getData(follow); | |
} else { | |
console.log(response.data.message); | |
} | |
}); | |
} | |
const url = 'https://letsrevolutionizetesting.com/challenge.json'; | |
getData(url); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment