I am running a web server on node the code for which is given below
var restify = require(\'restify\');
var server = restify.createServer();
var quotes = [
Struggling for hours, couldn't afford for more.
The solution that worked for me in less than 3 minutes was:
npm install axios
Code ended up even shorter:
const url = `${this.env.someMicroservice.address}/v1/my-end-point`;
const { data } = await axios.get(url, {
auth: {
username: this.env.auth.user,
password: this.env.auth.pass
}
});
return data;