1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| $.ajax({
//accepts: { xml: "text/xml", text: "text/plain" },
//type: "GET",
//cache: true, async: false, crossDomain: true,
dataType: 'json',
//dataType: 'jsonp',
//jsonp: false,
//jsonpCallback: "logResults",
//contentType: 'application/xml; charset=utf-8',
//converters: { "text xml jsonp": jQuery.parseXML },
url: 'https://orchestral2.mt.sncf.fr:8884/orchestral2/referentiel/R002',
success: function (data) {
console.log('statut : success');
},
error: function (resultat, statut, erreur) {
alert("Erreur " + statut + "\r\n" + erreur + "\r\n" + erreur.responseText);
},
complete: function (resultat, statut) {
console.log("Complete " );
}
}); |
Partager