title: Differences between default GET behaviour of `XMLHttpRequest` and `fetch`?
body: <p>Are there any differences between the <code>XHRGet</code> and <code>FetchGet</code> functions below in terms of the final request that gets sent to the server of <code>url</code>? Do they have different default headers, or anything like that? While using both methods for web crawling I've noticed that <code>fetch</code> tends to fail more often than <code>XMLHttpRequest</code>, and I'm not sure why that is the case.</p>
  
  <pre><code>(async () =&gt; {
    console.log( await XHRGet("https://stackoverflow.com") );
    console.log( await fetchGet("https://stackoverflow.com") );
  })();
  
  function XHRGet(url) {
    return new Promise(resolve =&gt; {
      let req = new XMLHttpRequest();
      req.addEventListener("load", function() { resolve(this.responseText); });
      req.open("GET", url);
      req.send();
    });
  }
  
  function fetchGet(url) {
    return fetch(url).then(res =&gt; res.text());
  }
  </code></pre>
  
  <p>Thanks!</p>