title: REST API call from html not working
body: <p>I am trying call a REST API post function from a script embedded into my html file. The button isn't working for some reason and no online resources have helped me thus far. This html code will be sent via email, and person using outlook with open the email and click the link to call the rest api.</p>
  
  <p>Here is the html code:</p>
  
  <pre><code>&lt;a href="#" onclick="markAsDone();" target="_blank" style="font-size: 16px; font-family: Helvetica, Arial, sans-serif; font-weight: normal; color: #ffffff;    text-decoration: none; display: inline-block;"&gt;I am done. &amp;rarr;&lt;/a&gt;
  &lt;script type="text/javascript"&gt;
  function markAsDone() {
      var xhttp = new XMLHttpRequest();
      xhttp.open("POST", "http://localhost:1337/UserDone", false);
      xhttp.sendRequestHeader("Content-type", "application/json");
      xhttp.send();
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Am I doing something wrong or is outlook not compatible for emails containing html with links like this?</p>