I have been trying to capture the response using the code below, but unfortunately, I am not able to retrieve it. Can someone please help me and let me know what I might be missing here?
function getData() {
var request = new XMLHttpRequest();
request.open('GET', 'http://demo8951713.mockable.io/fusionchart', true);
request.send();
var response = this.responseText;
alert(response);
}
getData()