code: function (method, path, plain, header, session, callback) {
        var ws = getWebsocketPlugin(),
            self = this,
            transports = app.config.transports,
            i = 0,
            error,
            response;
  
        if (ws) {
          if (transports && transports.length > 0) {
            async.whilst(
              function() {
                return (i < transports.length);
              },
              function (done) {
                self.doRequest(transports[i], method, path, plain, header, session, function (err, res) {
                  error = err;
                  response = res;
                  if (!err && res && res.ok) {
                    i = transports.length;
                  } else {
                    i++;
                    if (i < transports.length) {
                      delete self.request;
                    }
                  }
                  done();
                });
              },
              function (err) {
                callback(err || error, response);
              }
            );
          } else {
            error = 'no transport available';
            log.error('%s %s', app.name, error);
            callback(error);
          }
        } else {
          this.doRequest('http', method, path, plain, header, session, callback);
        }
      }
docs: Perform a request
  
  @param {String} method The required method
  @param {String} path The required path
  @param {Boolean} plain = false The required plain
  @param {Object} header The header for the request
  @param {Object} session The session
  @param {Function} callback The callback: next(err, res)
  @param {Error/String} callback.err The error if occurred
  @param {Object} callback.res The response received from the server
  @private