title: Pass parameters to web api controller with jQuery data attribute
body: <p>I have this jQuery call: </p>
  
  <pre><code>jQuery.ajax({
              type: "POST",
              url: "http://localhost:5832/api/Login/Post",
              data: JSON.stringify({ username: 'user12', password: '1234' }),
              contentType: "application/json; charset=utf-8", 
              dataType: "json",
              success: function (data) {
                  alert(data.d);
              }
          });
  </code></pre>
  
  <p>Which calls this web api controller action:</p>
  
  <pre><code>[System.Web.Http.AcceptVerbs("POST")]
  [System.Web.Http.HttpPost]
  public HttpResponseMessage Post(string username, string password)
  {
      string authenticationToken = "";
      authenticationToken = hpl.LoginUser(username, password);
      //Some other code
  
      return Request.CreateResponse(HttpStatusCode.OK, authenticationToken);
  }
  </code></pre>
  
  <p>I'm trying to submit the parameters with the data attribute but the call is not triggered. </p>
  
  <p>When I'm changing the url to: 
  <a href="http://localhost:5832/api/Login/Post?username=1&amp;password=2" rel="nofollow noreferrer">http://localhost:5832/api/Login/Post?username=1&amp;password=2</a></p>
  
  <p>I'm able to reach the controller action. </p>
  
  <p>How I can pass the parameters as part of the data attribute of the jquery call instead of query string params? </p>