I used this to call ajax get request
// Assign handlers immediately after making the request,
// and remember the jqxhr object for this request
var jqxhr = $.get("https://api.plivo.com/v1/Account/{auth_id}/Call/?status=live", function(data) {
console.log( "success" + data);
})
.done(function(data) {
console.log( "second success" );
})
.fail(function(data) {
console.log( "error" );
})
.always(function(data) {
console.log( "finished" );
console.log(data);
});
// Perform other work here ...
// Set another completion function for the request above
jqxhr.always(function() {
alert( "second finished" );
});
})
and the response is error see here https://www.screencast.com/t/lI6UdQ5H
note: {auth_id} I already replace that with my auth_id provided by plivo.
Thanks for your help!
Your code seem to work. I have made a demo here. please check your ajax url.
https://jsfiddle.net/aquadk/ez8Lae5v/3/
html