Skip to content

Instantly share code, notes, and snippets.

@AshRhazaly
Last active May 2, 2017 08:29
Show Gist options
  • Select an option

  • Save AshRhazaly/287df37884b2cdcd7702a146ff5cf6ee to your computer and use it in GitHub Desktop.

Select an option

Save AshRhazaly/287df37884b2cdcd7702a146ff5cf6ee to your computer and use it in GitHub Desktop.
react fetching data using AXIOS
Documentation
### https://github.com/mzabriskie/axios
// Installing axios & using it
1. Type "npm install --save axios" in terminal
2. import axios from 'axios';
// A GET response in axios
axios.get('http://api.giphy.com/v1/gifs/trending?api_key=dc6zaTOxFJmzC')
.then(response => {
})
.catch(error => {
console.log('Error fetching and parsing data', error);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment