title: ReferenceError : XMLHttpRequest is not defined
body: <p>I'm trying to load my javascript file in Mongo. However I'm getting the following error:</p>
  
  <blockquote>
    <p>ReferenceError : XMLHttpRequest is not defined</p>
  </blockquote>
  
  <p>The Javascript file, seems to function fine and I'm not getting any errors in my browser.</p>
  
  <p>Here's the code related to the request:</p>
  
  <pre><code>  var xmlhttp = new XMLHttpRequest();
    var url = "https://omgvamp-hearthstone-v1.p.mashape.com/cards";
  
    xmlhttp.onreadystatechange = function() {
      if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) {
          var result = JSON.parse(xmlhttp.responseText);
          updateCardsCollection(result);
          console.log(result);
      }
    };
    xmlhttp.open("GET", url, true);
    xmlhttp.send();
  </code></pre>
  
  <p>This is the line I'm using to load the file:</p>
  
  <pre><code>load("/myPath/database.js")
  </code></pre>
  
  <p>Note: I'm not using any frameworks yet. I just have the one Javascript file, trying to implement an api and save it to a mongo database.</p>