I am using DialogFlow chatbot to get user information on my website. I was first trying to get data from a page. This is the code :
const https = require('https');
https.get('myWebsiteName.com/apiToGetData', (resp) => {
let data = '';
// A chunk of data has been recieved.
resp.on('data', (chunk) => {
data += chunk;
});
// The whole response has been received. Print out the result.
resp.on('end', () => {
console.log(JSON.parse(data).explanation);
});
}).on("error", (err) => {
console.log("Error: " + err.message);
});
But when i checked in console, it printed Error: getaddrinfo EAI_AGAIN myWebsiteName.com:443. When I read about it, I got to know that it is a DNS lookup timed out error. But I want to know that is it because of my free version of Firebase and Dialogflow? If I buy their plans, will the same code work?