Source: ___validate_method.js



// http://stackoverflow.com/questions/161738/what-is-the-best-regular-expression-to-check-if-a-string-is-a-valid-url

var ERR = require("./_errors");
var re = /(GET)|(POST)|(PUT)|(DELETE)/;

/** 
 * @function validateMethod
 * @description: Just a little item to ensure that method is GET, PUT, POST or DELETE
 * found in file src/__validate_method
 */


module.exports = function(method) { 
	assert(re.test(method.toUpperCase())===true, ERR.INVALID_METHOD);
}