Skip to content

Instantly share code, notes, and snippets.

@pastranastevenaz
Created September 2, 2017 16:34
Show Gist options
  • Save pastranastevenaz/667c617e377ac27facc438dda98e301f to your computer and use it in GitHub Desktop.
Save pastranastevenaz/667c617e377ac27facc438dda98e301f to your computer and use it in GitHub Desktop.
Example of an axios get request using arrow functions
var albums = [];
axios.get('https://jsonplaceholder.typicode.com/albums')
.then(response =>{
this.albums = response.data
})
.catch(error =>{
console.log(error);
})
@Tasnimul-Sharan
Copy link

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment