title: I need wait for HTTP response
body: <p>i need to do several readings HTTP, and i need wait for response. But HTTP is async. Then i don't know how.</p>
  
  <p>my code is:</p>
  
  <pre><code>var clientelee = Ti.Network.createHTTPClient({
      // function called when the response data is available
      onload : function(e) {
          Ti.API.info("*******      Recibido: " + this.responseText);
      },
      // function called when an error occurs, including a timeout
      onerror : function(e) {
          Ti.API.debug("****** ERROR *********"+e.error);
      },
      onreadystatechange: function(e){
          Ti.API.info("******* STATUS *********"+e.readyState);
      },
      timeout : 3000  // in milliseconds
  });
  
  function LeeDatos(){
      url = "http://www.hola.com/read/"+leoSerie;
      // Prepare the connection.
       clientelee.open("GET", url);
       // Send the request.
       clientelee.send();     
  }
  
  
  for (i=0;i&lt;NRegistros;i++){
      TablaSerieTermostatos[i]=rows.field(0);
      leoSerie=rows.field(0);
      LeeDatos();
      ......
  }
  </code></pre>
  
  <p>Any suggestion?? Thanks</p>