public function dispatchRequest(ServerRequestInterface $request): RouteResult
    {
        $httpMethod = $request->getMethod();
        $uri = rawurldecode($request->getUri()->getPath()); //$uri = '/' . ltrim($request->getUri()->getPath(), '/');

        $result = $this->dispatch($httpMethod, $uri);

        return $result[0] !== self::FOUND
            ? $this->marshalFailedRoute($result)
            : $this->marshalMatchedRoute($result);
    }