flat-wall-31132
04/17/2024, 11:08 AM${username}:${password}
).toString('base64');
const response = await axios.get(https:///api//extinet/web/${data}
, {
headers: {
'Authorization': Basic ${authString}
// Add the Authorization header with the authString
},
httpsAgent: new https.Agent({ rejectUnauthorized: false }) // Ignore SSL certificate validation (optional)
});
// Handle the response data
console.log('Response data:', response.data);
// You can do further processing with the response data here
} catch (error) {
// Handle any errors
console.error('Error fetching data:', error);
}
}
// Call the function to fetch the data
fetchData();