title: Ajax request submitting get instead of post
body: <p>I have a form:</p>
  
  <pre><code>&lt;form onsubmit="return sendEmail()" id="emailForm" name="emailForm"&gt;
                     &lt;input type="hidden" name="_cc" value="email2@gmail.com" /&gt;
                      &lt;div class="row"&gt;
                          &lt;p class="left"&gt;
                              &lt;label for="name"&gt;Name*&lt;/label&gt;
                              &lt;input type="text" required="required" name="name" id="name" value="" /&gt;
                          &lt;/p&gt;
                          &lt;p class="right"&gt;
                              &lt;label&gt;Email*&lt;/label&gt;
                              &lt;input type="email" required="required" name="_replyto"&gt;
                          &lt;/p&gt;
                      &lt;/div&gt;
  
                      &lt;div class="row"&gt;
                          &lt;p class="left"&gt;
                              &lt;label for="phone"&gt;Phone/Mobile&lt;/label&gt;
                              &lt;input type="text" required="required"  name="phone" id="phone" value="" /&gt;
                          &lt;/p&gt;
                          &lt;p class="right"&gt;
                              &lt;label for="company"&gt;Organization&lt;/label&gt;
                              &lt;input type="text" name="company" id="company" value="" /&gt;
                          &lt;/p&gt;
                      &lt;/div&gt;
  
                      &lt;p&gt;
                          &lt;label for="message" class="textarea"&gt;Queries&lt;/label&gt;
                          &lt;textarea class="text" name="message" id="message"&gt;&lt;/textarea&gt;
                      &lt;/p&gt;
                  &lt;br /&gt;
                      &lt;div style="background-color: mediumaquamarine;margin-bottom: 2%" id="success"&gt;&lt;/div&gt;
                      &lt;button type="submit" class="btn btn-xl"&gt;Send&lt;/button&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>and jquery code to submit the form using ajax post:</p>
  
  <pre><code>    function sendEmail(){
          $.ajax({
              url: "http://formspree.io/email1@gmail.com",
              method: "POST",
              data: $('#emailForm').serialize(),
              dataType: "json",
              success: function(result){
                  $("#success").html("Message successfully sent");
              },
              error: function (request, status, error) {
                  $("#success").html("Oops! Something went wrong. Please try again");
              }
          });
          return false
      }
  </code></pre>
  
  <p>but it always submits get request and results in error response that get method is not allowed, use post only.(405 response code).</p>
  
  <p>Can't figure out whats wrong here.</p>