title: How can I post data as form data instead of a request payload?
body: <p>In the code below, the AngularJS <code>$http</code> method calls the URL, and submits the xsrf object as a "Request Payload" (as described in the Chrome debugger network tab). The jQuery <code>$.ajax</code> method does the same call, but submits xsrf as "Form Data".</p>
  
  <p>How can I make AngularJS submit xsrf as form data instead of a request payload?</p>
  
  <pre><code>var url = 'http://somewhere.com/';
  var xsrf = {fkey: 'xsrf key'};
  
  $http({
      method: 'POST',
      url: url,
      data: xsrf
  }).success(function () {});
  
  $.ajax({
      type: 'POST',
      url: url,
      data: xsrf,
      dataType: 'json',
      success: function() {}
  });
  </code></pre>