title: Cross Origin error with window.fetch() on Safari
body: <p>I'm trying to use the window.fetch API and along with a Polyfill for unsupporting browsers.</p>
  
  <p>My code works in both Chrome and Firefox, but is failing in Safari (all on Mac OSX).</p>
  
  <pre><code>function signup(fullname, email, restaurant, source) {
    return new Promise((resolve, reject) =&gt; {
      const params = `cm-name=${encodeURIComponent(fullname)}&amp;cm-ottdth-ottdth=${encodeURIComponent(email)}&amp;cm-f-hykuuh=${encodeURIComponent(restaurant)}&amp;cm-f-hyurjd=${encodeURIComponent(source)}`;
      fetch(`http://tastyplc.createsend.com/t/d/s/ottdth/?${params}`, {
        method: 'get',
        mode: 'no-cors'
      })
      .then(response =&gt; response.text())
      .then(data =&gt; resolve(data))
      .catch(error =&gt; reject(Error(error)));
    });
  }
  </code></pre>
  
  <p>I get the following error in Safari:</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load
    <a href="http://tastyplc.createsend.com/t/d/s/ottdth/?cm-name=example&amp;cm-ottdth-ottdth=example%40example.com&amp;cm-f-hykuuh=Charlotte%20Street&amp;cm-f-hyurjd=Website%20Sign%20Up" rel="nofollow">http://tastyplc.createsend.com/t/d/s/ottdth/?cm-name=example&amp;cm-ottdth-ottdth=example%40example.com&amp;cm-f-hykuuh=Charlotte%20Street&amp;cm-f-hyurjd=Website%20Sign%20Up</a>.
    Origin <a href="http://localhost:3000" rel="nofollow">http://localhost:3000</a> is not allowed by
    Access-Control-Allow-Origin.</p>
  </blockquote>
  
  <p>Could this be something related to the polyfill being used - since it mentions <strong>XMLHttpRequest</strong> (which I'm assuming the polyfill falls-back to).</p>
  
  <p><a href="https://github.com/github/fetch" rel="nofollow">https://github.com/github/fetch</a></p>
  
  <p>Anything I'm doing wrong or missing? It's driving me nuts.</p>
  
  <p>Thanks!</p>