axios node js
Install the axios module using npm:
npm install axios
Require the axios module in your Node.js file:
const axios = require('axios');
Make a GET request using axios:
axios.get('https://api.com/data')
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});