I want to achieve the same in ext js 6 by using ext.ajax as I do in the following jquery:
$.ajax({
url: "url/address",
crossDomain: true,
headers: {
'x-secure-token': "bla-bla"
},
dataType: 'json',
beforeSend: function (request) {
request.setRequestHeader("Accept", "application/json");
request.overrideMimeType("application/json");
},
success: function (json) {
console.log(json); var names = data; $('#cand').html(data);
}
});
How would I do that?