title: https Request in Alexa Skill
body: <p>I can't seem to get HTTP requests to work in my alexa skill, here is the relevant sample code:</p>
  
  <pre><code>var https = require('https');
  
  ...
  
  function getTreeFact(callbackFunction){
  
  
    var url = 'https://alexa.phl.chs.network/treefacts/index.php';
  
    https.get(url, function(res){
        var body = '';
  
        res.on('data', function(chunk){
            body += chunk;
        });
  
        res.on('end', function(){
            var gameResponse = JSON.parse(body);
            callbackFunction(gameResponse);
        });
    }).on('error', function(e){
      // Handle error
    });
  }
  
  ...
  
  this.getTreeFact(function (responseMessage){
      this.emit(':tell', responseMessage.message);
  });
  </code></pre>
  
  <p>I have no idea what I am doing wrong, I think I am making the HTTP request correctly. I know the skill works without this (simply commenting out the last three lines and replacing with just this.emit(':tell', 'hello') works fine).</p>