I'm trying to establish a downchannel stream with AVS using the http2 module for nodejs.
This is my current request:
// open downchannel stream to AVS var options = { method: 'GET', scheme: 'https', host: 'avs-alexa-na.amazon.com', path: '/v20160207/directives', port: 80, auth: 'Bearer ' + token }; var req = http2.request(options, (res) => { console.log('statusCode: ', res.statusCode); console.log('headers: ', res.headers); res.on('data', (d) => { process.stdout.write(d); }); }); req.on('error', (e) => { console.error(e); }); req.end();
This is the error code that I receive:
{ [Error: connect ECONNREFUSED 54.239.21.157:80] code: 'ECONNREFUSED', errno: 'ECONNREFUSED', syscall: 'connect', address: '54.239.21.157', port: 80 }
Does anyone know what's going on here?