How to use the xhr2.XMLHttpRequest.DONE function in xhr2

To help you get started, we’ve selected a few xhr2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github agershun / olap / src / xmla.js View on Github external
xhr.onreadystatechange = function() {
      if (xhr.readyState === XMLHttpRequest.DONE) {
          if (xhr.status === 200) {
              if (cb){
                  cb(undefined,xhr.responseText);
              }
          } else if (error){
              cb(xhr);
          }
          // Todo: else...?            
      }
  };
  xhr.open("POST", path, async); // Async
github agershun / olap / stuff / olap / xmla.js View on Github external
xhr.onreadystatechange = function() {
      if (xhr.readyState === XMLHttpRequest.DONE) {
          if (xhr.status === 200) {
              if (cb){
                  cb(undefined,xhr.responseText);
              }
          } else if (error){
              cb(xhr);
          }
          // Todo: else...?            
      }
  };
  xhr.open("POST", path, async); // Async

xhr2

XMLHttpRequest emulation for node.js

MIT
Latest version published 3 years ago

Package Health Score

68 / 100
Full package analysis