I am making a api cross domain request using JSONP and the external server returns me result in XML, below is my code:
$.ajax({
type: "Get",
url: "http://domain.com/function?Data=1234567890",
xhrFields: {withCredentials: true},
dataType: "JSONP text xml",
contentType: "application/xml",
cache: false,
success: function(xml)
{
alert($(this).find('ResponseStatus').text());
}
});
it returns me a xml but along with that it generates an error saying "Unexpected token <" which unfortunately stops my processing and i dont get an alert message. Any idea?
Best
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…