code: function(options) {
          var request = options.request;
          var config = options.config;
          
          // bind callbacks to readyState 4 (done)
          var complete = (config.scope) ?
              OpenLayers.Function.bind(config.callback, config.scope) :
              config.callback;
          
          // optional success callback
          var success;
          if(config.success) {
              success = (config.scope) ?
                  OpenLayers.Function.bind(config.success, config.scope) :
                  config.success;
          }
  
          // optional failure callback
          var failure;
          if(config.failure) {
              failure = (config.scope) ?
                  OpenLayers.Function.bind(config.failure, config.scope) :
                  config.failure;
          }
  
          if (OpenLayers.Util.createUrlObject(config.url).protocol == "file:" &&
                                                          request.responseText) {
              request.status = 200;
          }
          complete(request);
  
          if (!request.status || (request.status >= 200 && request.status < 300)) {
              this.events.triggerEvent("success", options);
              if(success) {
                  success(request);
              }
          }
          if(request.status && (request.status < 200 || request.status >= 300)) {                    
              this.events.triggerEvent("failure", options);
              if(failure) {
                  failure(request);
              }
          }
      }
docs: Method: runCallbacks
  Calls the complete, success and failure callbacks. Application
  can listen to the "complete" event, have the listener
  display a confirm window and always return false, and
  execute OpenLayers.Request.runCallbacks if the user
  hits "yes" in the confirm window.
  
  Parameters:
  options - {Object} Hash containing request, config and requestUrl keys