title: sendBeacon API not working temporarily due to security issue, any workaround?
body: <p>I have the following code to send asynchronous HTTP request using sendBeacon method,</p>
  <pre><code>var data = {
   name: 'test',
   uniqueId: Math.random()
  };
  var blob = new Blob([JSON.stringify(data)], {type : 'application/json'});
  navigator.sendBeacon('http://example.in/data/post', blob);
  </code></pre>
  <p>This code has worked fine for a long time. Currently, due to security issues in chrome <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=490015" rel="nofollow noreferrer">https://bugs.chromium.org/p/chromium/issues/detail?id=490015</a>,  we see the error &quot;<strong>Failed to execute 'sendBeacon' on 'Navigator': sendBeacon() with a Blob whose type is not CORS-safelists MIME-type is disallowed experimentally. See <a href="http://crbug.com/490015" rel="nofollow noreferrer">http://crbug.com/490015</a> for details.</strong>&quot;</p>
  <p>Is there any workaround to send JSON data by modifying request headers using the same sendBeacon API till the issue is fixed? It'll be useful for sites depending on this API to continue to use till a fix is made. Suggestions on using XHR to post data are not useful.</p>