code: function(xy, request, layer) {
          --this.pending;
          if (this.pending <= 0) {
              OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait");
              this.pending = 0;
          }
          if (request.status && (request.status < 200 || request.status >= 300)) {
              this.events.triggerEvent("exception", {
                  xy: xy, 
                  request: request,
                  layer: layer
              });
          } else {
              var doc = request.responseXML;
              if (!doc || !doc.documentElement) {
                  doc = request.responseText;
              }
              var features, except;
              try {
                  features = this.format.read(doc);
              } catch (error) {
                  except = true;
                  this.events.triggerEvent("exception", {
                      xy: xy,
                      request: request,
                      error: error,
                      layer: layer
                  });
              }
              if (!except) {
                  this.events.triggerEvent("getfeatureinfo", {
                      text: request.responseText,
                      features: features,
                      request: request,
                      xy: xy,
                      layer: layer
                  });
              }
          }
      }
docs: Method: handleResponse
  Handler for the GetFeatureInfo response.
  
  Parameters:
  xy - {<OpenLayers.Pixel>} The position on the map where the mouse event
  occurred.
  request - {XMLHttpRequest} The request object.
  layer - {<OpenLayers.Layer.WMTS>} The queried layer.