Ejemplo n.º 1
0
 public void onReadyStateChange(XMLHttpRequest xhr) {
   if (xhr.getReadyState() == XMLHttpRequest.DONE) {
     if (xhr.getStatus() == 200) {
       callback.onSuccess(xhr);
       xhr.clearOnReadyStateChange();
       return;
     }
     callback.onFail(xhr);
     xhr.clearOnReadyStateChange();
   }
 }
 private boolean isResponseReady() {
   return xmlHttpRequest.getReadyState() == XMLHttpRequest.DONE;
 }