anchor.diff:    xhr.setRequestHeader("Accept", "<%= Mime::WEB_CONSOLE_V2 %>");
     xhr.send(params);
   
  -  function isSuccess(status) {
  -    return status >= 200 && status < 300 || status === 304;
  -  }
  -
  -  // optional callbacks
  -  ok   = ok || function() {};
  -  fail = fail || function() {};
  -
     xhr.onreadystatechange = function() {
       if (xhr.readyState === 4) {
  -      if (isSuccess(xhr.status)) {
  -        ok(xhr);
  -      } else {
  -        fail(xhr);
  -      }
  +      callback(xhr);
       }
     };
   };
  
positive.code: // And so we need to require a module compatible with XMLHttpRequest from SDK.
  REPLConsole.XMLHttpRequest = typeof XMLHttpRequest === 'undefined' ? null : XMLHttpRequest;
  
  REPLConsole.request = function request(method, url, params, ok, fail) {
    var xhr = new REPLConsole.XMLHttpRequest();
  
    xhr.open(method, url, true);
  
negative.code:   var self = this;
    var params = 'input=' + encodeURIComponent(line);
  
    function isSuccess(status) {
      return status >= 200 && status < 300 || status === 304;
    }
  
    putRequest(self.getUrl(), params, function(xhr) {
      var response = JSON.parse(xhr.responseText);
      if (isSuccess(xhr.status)) {
        self.writeOutput(response.output);
      } else {
        self.writeError(response.output);
      }
    });
  };
  
  