title: Https request with XMLHttpRequest
body: <p>Im able to do Http requests (POST/GET) with XMLHttpRequest.</p>
  
  <p>I'm asking how to do requests with URLs like "https://www.gmail.com"
  I was trying something like this but the status code is 0</p>
  
  <pre><code>var http = new XMLHttpRequest();
      var url = "https://www.gmail.com";
  
      http.open("GET", url);
      http.onreadystatechange = function() {//Call a function when the state changes.
              if(http.readyState == 4 &amp;&amp; http.status == 200) {
                      //alert(http.responseText);
                  print("ok")
              }else{
                  print("cannot connect")
                  print("code:" + http.status)
                  print(http.responseText)
              }
      }
      http.send(null);
  </code></pre>
  
  <p>I get always "cannot connect" "code" 0 and nothing as response</p>
  
  <p>Any idea?</p>