title: Try to retrieve data from XML API link via fetch api and get a parser error
body: <p>This is the code:</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>fetch(url,
    {
      method: 'GET',
      headers: {
        'Content-Type': 'text/xml',
        'Accept-Encoding': 'gzip, deflate',
      },
    }
  )
    .then((response) =&gt; {
      console.log(response);
      response.text();
    })
    .then((data) =&gt; {
      const parser = new DOMParser();
      const xml = parser.parseFromString(data, 'text/xml');
      console.log(xml);
    })
    .catch(console.error);</code></pre>
  </div>
  </div>
  </p>
  <p>This is how it looks like on the browser:
  <img src="https://i.stack.imgur.com/2gF98.jpg" alt="In the browser" />
  This is the result in the console:
  <img src="https://i.stack.imgur.com/x2DiU.jpg" alt="result" /></p>