ajax response fiddle

by mustafa yılmaz

JavaScript

$.ajax({
    url: "/echo/xml/",
    type: "POST",
    data: {
        //Set an empty response to see the error
        xml: "<response></response>"   
    },
    dataType:"text xml",
    success: function(xml, textStatus, xhr) {
        console.log(arguments);
        console.log(xhr.status);
    },
    complete: function(xhr, textStatus) {
        console.log(xhr.status);
    } 
});