Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

data fetch with axios

npm i axios


const axios = require('axios'); 
(OR)
window.axios = require('axios');
(OR)
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>


axios.get("https://fakestoreapi.com/products/")
    .then(function (res){
    console.log(res.data);
})


 
PREVIOUS NEXT
Tagged: #data #fetch #axios
ADD COMMENT
Topic
Name
2+6 =