title: make post request with ajax
body: <p>I try to make a simple request to an api and get back the result, but my request is never launched (I am also looking in fiddler). What am I doing wrong?</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function(){
      $("#button").click(function(){
          makePostRequest("http://www.mocky.io/v2/587ccd320f000081015dxxxx", "dummy_json", null, "post", "json", "div");
      });
  });
  
  function makePostRequest(url, data, headers, httpVerb, dataType, elementId){
      alert('click');
      $.ajax({
      url: url,
      type: httpVerb,
      data: data,
      headers: {
          Header_Name_One: 'Header Value One',
          "Header Name Two": 'Header Value Two'
      },
      dataType: 'json',
      success: function (data) {
        alert("success");
      }
  }).done(function(msg){
      alert('done');
    });
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;button id="button"&gt;Send an HTTP POST request to a page and get the result back&lt;/button&gt;
  &lt;div id="div"&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>