Last active
July 16, 2019 09:14
-
-
Save manojnaidu619/26e27a439df3bf48037656c62f1bc8b2 to your computer and use it in GitHub Desktop.
Get request in Axios
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
created(){ // As soon as the page loads.. | |
axios.get('http://localhost:3000/api/v1/users.json') | |
.then(res => { | |
for(var i=0;i<res.data.length;i++){ | |
console.log(res.data[0].email) | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment