Check whether the given HTTP method is supported.
The list of supported methods is set above, in the {@link methods} variable.
@param {String} method
@returns {String} method (but to lower case)
@throws {TypeError} if the method isn't supported
431696
function(method){
            method = this.string(method);
            if(methods.indexOf(method.toLowerCase()) < 0){
                throw new TypeError('a method in [' + methods.join(', ') + '] is expected, but ' + method + ' given');
            }
            return method.toLowerCase();
        }
223889
public function isValidHttpMethod($method)
    {
        $method = strtoupper($method);

        if (in_array('ANY', $this->methods)) {
            return true;
        }

        return (bool)in_array($method, $this->methods);
    }
424273
function matchesMethod(method, opts) {
  var methods = !opts.method || Array.isArray(opts.method) ?
    opts.method : [opts.method];

  if (methods) {
    return !!~methods.indexOf(method);
  }
}
403867
public static boolean isGetterMethod(final Method method) {
        
        final String methodName = method.getName();
        if(!methodName.startsWith("get")) {
            return false;
            
        } else if(methodName.length() <= 3) {
            return false;
        }
        
        if(method.getParameterCount() > 0) {
            return false;
        }
        
        if(method.getReturnType().equals(Void.class)) {
            return false;
        }
        
        return true;
        
    }
1149049
function (method) {
        var
          str = '' + method,
          i = str.indexOf(SUPER)
        ;
        return i < 0 ?
          false :
          isBoundary(str.charCodeAt(i - 1)) &&
          isBoundary(str.charCodeAt(i + 5));
      }
243872
public boolean matches(String method, String uri) {
        return matches(HttpMethod.from(method), uri);
    }
623857
protected function isMethodAllowed($method)
    {
        // Make sure $method is string
        if (!is_string($method)) {
            throw new InvalidArgumentException(
                '$method must be string'
            );
        }

        // If method is simple method, always allow
        if ($this->isSimpleMethod($method)) {
            return true;
        }

        return in_array(
            $method,
            $this->config['allowMethods'],
            true
        );
    }
408497
private boolean isMethodApi(Method method)
  {
    if (_type == _api) {
      return true;
    }
    
    for (Method methodApi : _api.getMethods()) {
      if (methodApi.getName().equals(method.getName())) {
        return true;
      }
    }
    
    return false;
  }
1341507
private static boolean isApplicable(Method method, Property property, boolean strict) {
        if (method.getArguments().size() != 1) {
            return false;
        }

        if (!method.getArguments().get(0).getTypeRef().equals(property.getTypeRef())) {
            return false;
        }

        String capitalized = capitalizeFirst(property.getName());
        if (method.getName().endsWith("set" + capitalized)) {
            return true;
        }

        if (!strict && method.getName().endsWith("set" + property.getNameCapitalized())) {
            return true;
        }
        return false;
    }
180587
function(method) {
		 	if(typeof method === "function") {
				var args = [];
								
				for(var x = 1; x <= arguments.length; x++) {
					if(arguments[x]) {
						args.push(arguments[x]);
					}
				}
				
				method.apply(this, args);
			}
		}
325446
def method(self, method):
        
        if method is None:
            raise ValueError("Invalid value for `method`, must not be `None`")  # noqa: E501
        allowed_values = ["WEBHOOK", "EMAIL", "PAGERDUTY"]  # noqa: E501
        if method not in allowed_values:
            raise ValueError(
                "Invalid value for `method` ({0}), must be one of {1}"  # noqa: E501
                .format(method, allowed_values)
            )

        self._method = method
472905
public HttpRequest method(Method method) {
		if (Method.PATCH == method) {
			this.method = Method.POST;
			this.header("X-HTTP-Method-Override", "PATCH");
		} else {
			this.method = method;
		}
		return this;
	}
841222
public boolean matches(HttpMethod method, String uri) {
        if (this.httpMethod == method) {
            Matcher matcher = regex.matcher(uri);
            return matcher.matches();
        } else {
            return false;
        }
    }
1258088
protected function method($method)
    {
        if (strtolower($this->request->getMethod()) != strtolower($method)) {
            throw new MethodNotAllowedException('No matching method for HTTP method "'.$this->request->getMethod().'"');
        }
        return true;
    }
727269
private static boolean isPublicInstanceMethod(Method method)
    {
        return Modifier.isPublic(method.getModifiers()) &&
            !Modifier.isStatic(method.getModifiers());
    }
1124276
public void withHttpMethod(Http method) {
        Objects.requireNonNull(method, Required.METHOD.toString());
        this.method = method;
    }
278325
function addMethod(name, method) {
        if (method !== undefined) {
            methods[name] = method;
        }
        return methods[name];
    }