如何将数据作为表单数据而不是请求有效负载发布?
$http
$.ajax
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() {}});
相关分类