function handleRequest(req, res) {
  var self = this;
  var config = self.app.config;

  // if request is type POST|config.transport.method and on /exec|config.transport.path url then parse the data and handle it
  if (req.url.indexOf(config.transport.path) !== -1 && req.method.toLowerCase() === config.transport.method.toLowerCase() ) {
    return self.app.exec(req.body, function(err, out) {
      if (err) {
        return handleError.call(self, err, req, res);
      }

      sendResponse(res, out || null, { statusCode: 200 });
    });
  }

  // default action for the rest of requests
  sendResponse(res, { message: 'To call an action use '+config.transport.path }, { statusCode: 200 });
}
function handleRequest(req, res) {
  var self = this;
  var config = self.app.config;

  
  if (req.url.indexOf(config.transport.path) !== -1 && req.method.toLowerCase() === config.transport.method.toLowerCase() ) {
    return self.app.exec(req.body, function(err, out) {
      if (err) {
        return handleError.call(self, err, req, res);
      }

      sendResponse(res, out || null, { statusCode: 200 });
    });
  }

  
  sendResponse(res, { message: 'To call an action use '+config.transport.path }, { statusCode: 200 });
}
function handleRequest ( req , res ) { var self = this ; var config = self . app . config ; // if request is type POST|config.transport.method and on /exec|config.transport.path url then parse the data and handle it if ( req . url . indexOf ( config . transport . path ) !== - 1 && req . method . toLowerCase ( ) === config . transport . method . toLowerCase ( ) ) { return self . app . exec ( req . body , function ( err , out ) { if ( err ) { return handleError . call ( self , err , req , res ) ; } sendResponse ( res , out || null , { statusCode : 200 } ) ; } ) ; } // default action for the rest of requests sendResponse ( res , { message : 'To call an action use ' + config . transport . path } , { statusCode : 200 } ) ; }
How to handle incoming requests

@param {Object} req
@param {Object} res
@private
How to handle incoming requests