Skip to content

Instantly share code, notes, and snippets.

@JoseGonzalez321
Created June 8, 2017 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoseGonzalez321/766aae82ecd96a2d3152e1d4ee72cabd to your computer and use it in GitHub Desktop.
Save JoseGonzalez321/766aae82ecd96a2d3152e1d4ee72cabd to your computer and use it in GitHub Desktop.
Playing around with Axios library
<Html>
<head>
</head>
<body>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
// reg JS
<!-- axios('http://megaman-robot-masters.herokuapp.com/') -->
<!-- .then(function (response) { -->
<!-- console.table(response.data); -->
<!-- }) -->
<!-- .catch(function (error) { -->
<!-- console.log(error); -->
<!-- }); -->
// Using arrows
axios('http://megaman-robot-masters.herokuapp.com/')
.then( response => console.table(response.data))
.catch( error => console.log(error));
</script>
</body>
</Html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment