I have (still error resp = undefinited). I test request return data ok. Because I have a little skill in JavaScript, I need a small step to set data from response of request.
    var xhttp = new XMLHttpRequest();
    xhttp.open("POST", "https://localhost:8443/control/jqxGeneralServicer?sname=JQGetListCustomerByCluster&deliveryClusterId=120120", true);
    xhttp.setRequestHeader('Content-Type', 'application/json');
    xhttp.send();
    var resp;
    xhttp.onreadystatechange = function() {
        if (this.readyState == 4 && this.status == 200) {
        resp = this.responseText        
        }
    }
    console.log("resp = " + resp);
I want resp has data inside it, how to do it?
 
     
    