AWS Lambda Node.js HTTP GET Request is never made

I have the following intention. When intent is entered, I want to make a GET request to the external API. The intent is in place, but my http.get request is not. If you look below I added a log statement to the query and it never gets executed. Any ideas what the problem might be?

'BlogEntrySlugIntent': function () {
  var url = 'http://jsonplaceholder.typicode.com/posts/1';

  http.get( url, function( response ) {
    console.log('In get request');
    response.on( 'data', function( data ) {
      var text = 'Data returned is: ' + data;
      this.emit(':tell', 'hellloooo');
    });
  });
},

      

+3


source to share





All Articles