bin/server/sans-server.js
function validMethod(req, res, next) {
    if (httpMethods.indexOf(req.method) === -1) {
        res.sendStatus(405);
    } else {
        next();
    }
}
function validMethod(req, res, next) {
    if (httpMethods.indexOf(req.method) === -1) {
        res.sendStatus(405);
    } else {
        next();
    }
}
function validMethod ( req , res , next ) { if ( httpMethods . indexOf ( req . method ) === - 1 ) { res . sendStatus ( 405 ) ; } else { next ( ) ; } }
Middleware to make sure the method is valid.
@param {Request} req
@param {Response} res
@param {function} next
Middleware to make sure the method is valid .