global.XMLHttpRequest = class XMLHttpRequest {

    readyState = 4;
    status = 200;
    statusText = 'OK';
    response = { "A": "B" };
    responseText = JSON.stringify(this.response);
  
    constructor() {
  
    }
  
    open(method, url, async) {
      if (url != "post") {
        this.onreadystatechange();
      }
    }

    abort(){
        
    }
  
    send(data) {
      this.responseText = data;
      this.response = JSON.parse(data);
      this.onreadystatechange();
    }
  
  
  };