So I'm currently trying to have an intent trigger an http request but keep getting errors.
When the intent triggers this code is executed
const https = require('https');
https.get('*************',
(resp) => {
let data = '';
resp.on('data', (chunk) => {
data += chunk;
});
resp.on('end', () => {
console.log(JSON.parse(data).explanation);
});
}).on("error", (err) => {
console.log("Error: " + err.message);
});
When running the intent I get Error: getaddrinfo ENOTFOUND back
My code works fine when I run it locally so the issue appears to be something not lining up properly with dialogflow
If anyone has any advice I would greatly appreciate it.
Thanks!