title: Slack incoming webhook: Request header field Content-type is not allowed by Access-Control-Allow-Headers in preflight response
body: <p>I try to post a slack message via the fetch API in a browser:</p>
  
  <pre><code>fetch('https://hooks.slack.com/services/xxx/xxx/xx', {
    method: 'post',
    headers: {
      'Accept': 'application/json, text/plain, */*',
      'Content-type': 'application/json'
    },
    body: JSON.stringify({text: 'Hi there'})
  })
    .then(response =&gt; console.log)
    .catch(error =&gt; console.error);
  };
  </code></pre>
  
  <p>I get the following error message: </p>
  
  <pre><code>Fetch API cannot load:
  https://hooks.slack.com/services/xxxxxxx/xxxxx. 
  Request header field Content-type is not allowed by Access-Control-Allow-Headers in preflight response.
  </code></pre>
  
  <p>What to do?</p>