【发布时间】:2012-07-22 08:52:30
【问题描述】:
对于这个 jQuery ajax POST 是否有 AngularJS 等效调用,使用 contentType 和 setRequestHeader?
$.ajax({
url: "http://localhost/songs",
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json",
beforeSend: function (xhr) {
xhr.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/sharepoint/soap/UpdateListItems");
},
success: function(data){
console.log(data);
}
});
【问题讨论】: