4
jquery $ .ajax에서 각도 $ http로
교차 출처에서 잘 작동하는 jQuery 코드가 있습니다. jQuery.ajax({ url: "http://example.appspot.com/rest/app", type: "POST", data: JSON.stringify({"foo":"bar"}), dataType: "json", contentType: "application/json; charset=utf-8", success: function (response) { console.log("success"); }, error: function (response) { console.log("failed"); } }); 이제 성공하지 않고 이것을 Angular.js 코드로 변환하려고합니다. $http({ url: "http://example.appspot.com/rest/app", dataType: "json", method: "POST", data: JSON.stringify({"foo":"bar"}), headers: { …