// Import axios libraryconst axios = require('axios');
// Data to be sentconst data = {
key: 'value'};
// URL to post the dataconst url = 'https://api.example.com';
// Sending a POST request using Axiosaxios.post(url, data)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});