JavaScript

[Javascript] Ajax로 xml 데이터 post하기

NariNalDa 2013. 3. 12. 09:45

var xml_data = '<xml></xml>';

$.ajax({

    type: "POST",

    url : "http://abc.abc.abc",

    contentType: "xml",

    data : xml_data,

    /* headers: {"Authorization": auth_info}, 필요한경우넣으세요 */

    success: function(msg) {

    console.log("succeed");

    },

    error: function(msg) {

  console.log(" failed");

 }

});