Checks if the action supports an HTTP method, according to its configuration.

@param actionMethodName name of action method.
@param httpMethod http method
@return true if supports, false if does not.
964744
public boolean actionSupportsHttpMethod(String actionMethodName, HttpMethod httpMethod) {
        if (restful()) {
            return restfulActionSupportsHttpMethod(actionMethodName, httpMethod) || standardActionSupportsHttpMethod(actionMethodName, httpMethod);
        } else {
            return standardActionSupportsHttpMethod(actionMethodName, httpMethod);
        }
    }
829678
public function isMethodFailure(): bool
    {
        if ($this->isSuccess() || $this->allowedMethods === self::HTTP_METHOD_ANY) {
            return false;
        }

        return true;
    }
1082330
public boolean supportsBatchUpdates(DatabaseMetaData meta) {
    try {
      return meta.supportsBatchUpdates();
    } catch(Throwable e) {
      getLogger().info("Missing DatabaseMetaData.supportsBatchUpdates method.");
      return false;
    }
  }
304439
private boolean isWorkMethodSynchronized(Class<? extends Work> workClass, String methodName)
   {
      try
      {
         Method method = SecurityActions.getMethod(workClass, methodName, new Class[0]);
         if (Modifier.isSynchronized(method.getModifiers()))
            return true;
      }
      catch (NoSuchMethodException e)
      {
         //Never happens, Work implementation should have these methods
      }

      return false;
   }
1248372
def valid_action_request(method):
    

    @functools.wraps(method)
    def _wrapper(self, *args, **kwargs):
        assert isinstance(self, BaseRequestHandler)
        if not self.is_request_valid:
            return self.reply_bad_request()

        try:
            return method(self, *args, **kwargs)
        except UserWarning as e:
            return self.reply_server_error(e)
        except Exception as e:
            return self.reply_server_error(e)

    return _wrapper
243872
public boolean matches(String method, String uri) {
        return matches(HttpMethod.from(method), uri);
    }
706908
function controllerMethod (controller, method) {
  if (controller && controller[method]) {
    return controller[method]
  }

  // Handle hello-based Controller classes
  if (isClass(controller) && controller.action) {
    return controller.action(method)
  }

  return notImplemented
}
152227
protected HTTPResponse submitHTTPRequestImpl(HTTPRequest httpRequest,HTTPMethod httpMethod)
    {
        return this.httpClient.submitHTTPRequest(httpRequest,this.httpClientConfiguration,httpMethod);
    }
1102662
protected boolean isOpenAPIMethod(MethodDoc methodDoc) {
		AnnotationDesc[] annotations = methodDoc.annotations();
		boolean isActionMethod = false;
		for (int i = 0; i < annotations.length; i++) {
			if (annotations[i].annotationType().name().equals("RequestMapping")
					|| annotations[i].annotationType().name().equals("PostMapping")
					|| annotations[i].annotationType().name().equals("GetMapping")
					|| annotations[i].annotationType().name().equals("DeleteMapping")
					|| annotations[i].annotationType().name().equals("PutMapping")
					|| annotations[i].annotationType().name().equals("PatchMapping") ) {
				isActionMethod = true;
				break;
			}
		}
		Tag[] t = methodDoc.tags(WRAPITaglet.NAME);
		return isActionMethod
				|| t.length > 0
				|| this.isProgramElementDocAnnotatedWith(methodDoc, "javax.ws.rs.Path");
	}
1097474
protected boolean doValidate(HttpRequestMessage request, final boolean isPostMethodAllowed) {

        if ( !isPostMethodAllowed ) {
            if ( request.getMethod() != HttpMethod.GET) {
                return false;
            }
        } else {
            if ( request.getMethod() != HttpMethod.GET || request.getMethod() == HttpMethod.POST ) {
                return false;
            }
        }

        if ( request.getVersion() != HttpVersion.HTTP_1_1) {
            return false;
        }

        if ( request.getRequestURI() == null ) {
            return false;
        }

        boolean ok = requireHeader(request, "Connection", "Upgrade");
        if ( !ok ) { return false; }

        ok = requireHeader(request, "Upgrade", "WebSocket");
        if ( !ok ) { return false; }

        ok = requireHeader(request, "Host");

        return ok;
    }
1208747
private HttpServerRequestActionBuilder request(HttpMethod method, String path) {
        HttpServerRequestActionBuilder httpServerRequestActionBuilder = new HttpServerRequestActionBuilder(action, httpServer)
                .withApplicationContext(applicationContext)
                .method(method);

        if (StringUtils.hasText(path)) {
            httpServerRequestActionBuilder.path(path);
        }

        return httpServerRequestActionBuilder;
    }
366144
protected function resolveActionMethodName()
    {
        if ($this->request->getControllerActionName() === 'index') {
            $actionName = 'index';
            switch ($this->request->getHttpRequest()->getMethod()) {
                case 'HEAD':
                case 'GET':
                    $actionName = ($this->request->hasArgument($this->resourceArgumentName)) ? 'show' : 'list';
                break;
                case 'POST':
                    $actionName = 'create';
                break;
                case 'PUT':
                    if (!$this->request->hasArgument($this->resourceArgumentName)) {
                        $this->throwStatus(400, null, 'No resource specified');
                    }
                    $actionName = 'update';
                break;
                case 'DELETE':
                    if (!$this->request->hasArgument($this->resourceArgumentName)) {
                        $this->throwStatus(400, null, 'No resource specified');
                    }
                    $actionName = 'delete';
                break;
            }
            if ($this->request->getControllerActionName() !== $actionName) {
                // Clone the request, because it should not be mutated to prevent unexpected routing behavior
                $this->request = clone $this->request;
                $this->request->setControllerActionName($actionName);
            }
        }
        return parent::resolveActionMethodName();
    }
319031
protected function matchSimilarRoute($httpMethod, $path)
    {
        $dm = [];

        if (($sm = $this->checkStaticRouteInOtherMethods($httpMethod, $path))
                || ($dm = $this->checkDynamicRouteInOtherMethods($httpMethod, $path))) {
            throw new MethodNotAllowedException($httpMethod, $path, array_merge((array) $sm, (array) $dm));
        }

        throw new NotFoundException;
    }
907526
private function isHttpMethodSupported($requestMethod)
    {
        $requestMethodName = 'http' . ucfirst(strtolower($requestMethod));
        foreach (get_class_methods($this) as $methodName) {
            if (strpos($methodName, $requestMethodName) === 0) {
                return true;
            }
        }

        return false;
    }
937522
public boolean matches(HttpMethod httpMethod, String requestUri) {
        if (this.httpMethod == httpMethod) {
            return matches(requestUri);
        }
        return false;
    }
966867
public static boolean hasMethod(Class<?> targetClass, String methodName, Class... parameterTypes) {
        try {
            targetClass.getMethod(methodName, parameterTypes);
            return true;
        } catch (NoSuchMethodException e) {
            return false;
        }
    }
621008
private static boolean implementsMethod(ClassNode classNode, String methodName, Class[] argTypes) {
        List methods = classNode.getMethods();
        if (argTypes == null || argTypes.length ==0) {
            for (Iterator i = methods.iterator(); i.hasNext();) {
                MethodNode mn = (MethodNode) i.next();
                boolean methodMatch = mn.getName().equals(methodName);
                if(methodMatch)return true;
                // TODO Implement further parameter analysis
            }
        }
        return false;
    }