title: jQuery Ajax post not passing parameters
body: <p>I'm attempting to use jQuery's $.ajax() function to post form variables to an MVC route. Problem is, when the code hits my MVC action, all of the parameters are null, even though data is being passed to them:</p>
  
  <p><strong>jQuery:</strong></p>
  
  <pre><code>$(function () {
      $('#signupform').submit(function (e) {
          e.preventDefault();
  
          if ($(this).valid()) {
              var postData = '{name : "' + $("#Name").val() + '", email : "' + $("#Email").val() + '", message : "' + $("#Message").val() + '" }';
  
              $.ajax({
                  url: "/api/contact-form-post",
                  data: postData,
                  type: "get"
              })
              .complete(function (data) {
                  $("#formContainer").html($("#formThankYou").html());
              });
          }
      });
  });
  </code></pre>
  
  <p>calling alert(postData) outputs the following:</p>
  
  <pre><code>{name : "Scott Smith", email : "scott@smith.com", message : "test message" }
  </code></pre>
  
  <p><strong>MVC Action:</strong></p>
  
  <pre><code>public JsonResult ContactFormPost(string email, string name = "" , string message = "")
          {
              AddEmailToMailingList(email);
  
              if (!String.IsNullOrEmpty(name) &amp;&amp; !String.IsNullOrEmpty(message))
              {
                  InsertContactMessage(email, name, message);
              }
  
              return Json(true);
          }
  </code></pre>
  
  <p>Using FireBug to examine the request reveals that this is the URL that's being called. Obviously the url parameters are not in the correct format, but I can't figure out why.</p>
  
  <p><a href="http://localhost:10637/api/contact-form-post" rel="noreferrer">http://localhost:10637/api/contact-form-post</a>?{name%20:%20%22Scott%20Smith%22,%20email%20:%20%22scott@smith.com%22,%20message%20:%20%22Test%20message%22%20}</p>
  
  <p>Am I making any obvious mistakes here that would cause the parameters of my ContactFormPost method to always be null?</p>