title: HTTP request with Alexa and Lambda on SDK v2, how to make it works?
body: <p>I am playing with ASK SDK v2 provided by Amazon in order to make Skill for Alexa but I face an architectural problem :</p>
  
  <p>First of all, the HTTP request works like a charm but I would like to return speach response if and only if my HTTP request is complete but I don't even know if it's possible because of the "handle" function that should return something (look at comments) :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const MyIntentHandler = {
  
    canHandle(handlerInput) {
      const request = handlerInput.requestEnvelope.request;
      return request.type === 'LaunchRequest' || (request.type === 'IntentRequest' &amp;&amp; request.intent.name === 'MyIntent');
    },
    handle(handlerInput) {
  
      var options = {
        host: 'http://foo.com',
        port: 80,
        path: '/mypath',
        method: 'GET'
      };
  
      var req = http.request(options, function(result){
        result.on("end", function(){
          //I would like to return speak here like that :
          //return handlerInput.responseBuilder.speak("It works").withSimpleCard("MyTestApp", "It works").getResponse()
        })
      });
      req.end();
      //And I would like to remove this line to manage response in result.on("end", function(){}) above
      return handlerInput.responseBuilder.speak("It works").withSimpleCard("MyTestApp", "It works").getResponse();
    },
  };</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any idea to deal with this ?</p>