Retrieves the HTTP method of the request.

@return string Returns the request method.
558835
public function getMethod()
    {
        if (!isset($this->method)) {
            $this->method = $this->determineMethod();
        }
        
        return $this->method;
    }
1338019
public function getMethods()
    {
        $requestMethod = $this->request->getAccessControlRequestMethod();
        if (in_array('*', $this->methods) && $requestMethod) {
            return $requestMethod;
        }

        return $this->methods;
    }
58844
public function getMethod()
    {
        if (null === $this->method) {
            $this->method = $this->getServer('REQUEST_METHOD', 'GET');
        }
        return $this->method;
    }
1167985
public function getMethodName()
    {
        if (!empty($this->methodRef)) {
            return substr($this->methodRef, strpos($this->methodRef, ':') + 1);
        }

        return null;
    }
320598
public function method()
    {
        if (isset($this->parameters->post()['_method'])) {
            $method = strtoupper($this->parameters->post()['_method']);
            if (in_array($method, self::$allowedHackMethods)) {
                return $method;
            }
        }
        return $this->getParam('REQUEST_METHOD');
    }
669706
public function getUrl()
    {
        $url = self::BASE_FNS_URL . $this->getUrlPath();

        if ($this->getHttpMethod() === self::HTTP_METHOD_GET) {
            $url .= '?' . http_build_query($this->getPayload());
        }

        return $url;
    }
741799
public static function get_method() {
	if (empty($_SERVER['REQUEST_METHOD'])) {
		return 'GET';
	}
	
	$allowed_methods = ['GET', 'PUT', 'POST', 'PATCH', 'DELETE', 'OPTIONS', 'HEAD'];
	if (in_array($_SERVER['REQUEST_METHOD'], $allowed_methods) == false) {
		return false;
	}
	
	return $_SERVER['REQUEST_METHOD'];
}
455800
public function getUrl()
    {
        if (empty($this->url)) {
            $url = $this->httpRequest()->getCurrentUrl(true)->getPath();
            // we need to have the trailing slash because of the match inside matchRequest
            // and also when matching the default method, we can do an incorrect match if we don't have the start and end slash
            $this->url = $this->str($url)->trimRight('/')->val() . '/';
        }

        return $this->url;
    }
1350050
protected function getApiMethod()
    {
        if (!isset($this->apiMethod)) {
            $words = explode('_', Str::snake(class_basename($this)), -1);
            $endpoint = strtolower(array_shift($words));
            $action = Str::camel(implode('_', $words)) ?: '*';
            $method = sprintf('%s.%s', $endpoint, $action);
            $this->apiMethod = $endpoint ? $method : 'undefined';
        }

        return $this->apiMethod;
    }
1016229
public function getHttpClient()
    {
        if (!is_object($this->_httpClient)) {
            $this->_httpClient = new Client([
                'requestConfig' => [
                    'format' => Client::FORMAT_XML
                ],
                'responseConfig' => [
                    'format' => Client::FORMAT_XML
                ],
            ]);
        }
        return $this->_httpClient;
    }
702112
public function getMethod() :? int
  {
    switch($this->server('REQUEST_METHOD')) {
      case 'GET':
        return self::HTTP_GET;
      case 'POST':
        return self::HTTP_POST;
      case 'HEAD':
        return self::HTTP_HEAD;
      case 'PUT':
        return self::HTTP_PUT;
      case 'DELETE':
        return self::HTTP_DELETE;
      case 'TRACE':
        return self::HTTP_TRACE;
      case 'OPTIONS':
        return self::HTTP_OPTIONS;
      case 'CONNECT':
        return self::HTTP_CONNECT;
    }

    return null;
  }
443972
public function method()
    {
        $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : null;

        if ($method !== 'POST') {
            return $method;
        }

        if (array_key_exists('HTTP_X_HTTP_METHOD', $_SERVER)) {
            if (in_array($_SERVER['HTTP_X_HTTP_METHOD'], ['PUT', 'DELETE'])) {
                $method = $_SERVER['HTTP_X_HTTP_METHOD'];
            }
        }

        return $method;
    }
736738
public function requestLine()
    {
        $uri = $this->url->path();
        if ($this->url->query()) {
            $uri .= '?' . $this->url->query();
        }

        return sprintf('%s %s HTTP/%s', $this->method, $uri, $this->version);
    }
263077
public static function getTransportMethod()
    {
        $method = 'curl';
        if (!self::isCurlEnabled()) {
            $method = 'fopen';
            if (@ini_get('allow_url_fopen') != '1') {
                $method = 'socket';
                if (!self::isSocketEnabled()) {
                    return null;
                }
            }
        }
        return $method;
    }
466888
public final String getMethod() {
		if(method == null) {
			method = message instanceof Request ? ((Request) message).getMethod()
				: ((CSeqHeader) message.getHeader(CSeqHeader.NAME)).getMethod();
		}
		if(logger.isDebugEnabled()) {
			logger.debug("getMethod - return=" + method);
		}
		return method;
	}
228887
protected function getRequest()
    {
        $request = new Request();

        $request->setUrl($this->getUrl())
            ->setHeaders($this->getHeaders())
            ->setParams($this->getRequestParams())
            ->setBody($this->getRequestBody())
            ->setUserIp($this->getUserIp());
      
        if (isset($_SERVER)) {
            $request->setMethod(isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : null)
                ->setQueryString(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : null);
        }
      
        if (isset($_GET)) {
            $request->setGet($_GET);
        }
        if (isset($_POST)) {
            $request->setPost($_POST);
        }
        
        if ($request->getMethod() === 'PUT') {
            $postData = array();
            parse_str($request->getBody(), $postData);
            $request->setPost($postData);
        }
        
        $extras = $this->getRequestExtras();
        if (!$extras) {
            $extras = array();
        }

        $request->setExtras($extras);
        
        if (isset($_SESSION) && is_array($_SESSION) && count($_SESSION) > 0) {
            $request->setSession($_SESSION);
        }
        return $request;
    }
1359783
public static function get()
    {
        if (self::$current !== null) {
            return self::$current;
        }

        $resp = 404;

        $args = array();

        $routes = parent::$httpRoutes;
        $path = \UtilsPath();
        $method = $_SERVER['REQUEST_METHOD'];

        //...
        if (isset($routes[$path])) {
            $verbs = $routes[$path];
        } else {
            foreach ($routes as $route => $actions) {
                if (parent::find($route, $path, $args)) {
                    $verbs = $actions;
                    break;
                }
            }
        }

        if (isset($verbs[$method])) {
            $resp = $verbs[$method];
        } elseif (isset($verbs['ANY'])) {
            $resp = $verbs['ANY'];
        } elseif (isset($verbs)) {
            $resp = 405;
        }

        if (is_numeric($resp)) {
            self::$current = $resp;
        } else {
            self::$current = array(
                'callback' => $resp, 'args' => $args
            );
        }

        $routes = null;

        return self::$current;
    }