Returns the full URI
@param ServerRequestInterface $request
@return string
332534
private function getRequestUri(ServerRequestInterface $request) : string
    {
        $uri = $request->getUri()->getPath();
        $query = $request->getUri()->getQuery();

        if (!empty($query)) {
            return $uri . '?' . \urldecode($query);
        }

        return $uri;
    }
1074783
private function getOverrideMethod(ServerRequestInterface $request)
    {
        if ($request->getMethod() === 'POST' && $this->postParam !== null) {
            $params = $request->getParsedBody();

            if (isset($params[$this->postParam])) {
                return strtoupper($params[$this->postParam]);
            }
        } elseif ($request->getMethod() === 'GET' && $this->getParam !== null) {
            $params = $request->getQueryParams();

            if (isset($params[$this->getParam])) {
                return strtoupper($params[$this->getParam]);
            }
        }

        return strtoupper($request->getHeaderLine(self::HEADER));
    }
374359
public function match(ServerRequestInterface $request)
    {
        $basePathLength = strlen($this->baseUri['path']);

        return RouteCollectionMatcher::matchRouteCollection(
            $this->routeCollection,
            $request,
            $basePathLength,
            []
        ) ?: MatchResult::fromMatchFailure();
    }
1320384
public static function getIp(ServerRequestInterface $request)
    {
        $ips = self::getIps($request);

        return isset($ips[0]) ? $ips[0] : null;
    }
498729
private function getProxiedIp(ServerRequestInterface $request)
    {
        foreach ($this->proxyHeaders as $name) {
            if ($request->hasHeader($name)) {
                if (substr($name, -9) === 'Forwarded') {
                    $ip = $this->getForwardedHeaderIp($request->getHeaderLine($name));
                } else {
                    $ip = $this->getHeaderIp($request->getHeaderLine($name));
                }

                if ($ip !== null) {
                    return $ip;
                }
            }
        }
    }
1152088
private String getFullURI(HttpServletRequest request) {
        StringBuilder buffer = new StringBuilder(request.getMethod());
        buffer.append(" ");
        buffer.append(request.getRequestURI());
        String queryParam = request.getQueryString();
        if (!Utils.isEmpty(queryParam)) {
            buffer.append("?");
            buffer.append(queryParam);
        }
        return buffer.toString();
    }
375470
public static String getFullUrl(HttpServletRequest request) {

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

        return request.getRequestURI() + "?" + request.getQueryString();
    }
111475
private function cacheKeyFromRequest(RequestInterface $request)
    {
        $uri = $request->getUri();

        $queryStr = $uri->getQuery();
        if (!empty($queryStr)) {
            $queryArr = [];

            parse_str($queryStr, $queryArr);

            $queryArr = $this->parseIgnoredParams($queryArr);
            $queryStr = http_build_query($queryArr);

            $uri = $uri->withQuery($queryStr);
        }

        $cacheKey = 'request/' . $request->getMethod() . '/' . md5((string)$uri);
        return $cacheKey;
    }
170866
protected function _getDigest(ServerRequest $request)
    {
        $digest = $request->getEnv('PHP_AUTH_DIGEST');
        if (empty($digest) && function_exists('apache_request_headers')) {
            $headers = apache_request_headers();
            if (!empty($headers['Authorization']) && substr($headers['Authorization'], 0, 7) === 'Digest ') {
                $digest = substr($headers['Authorization'], 7);
            }
        }
        if (empty($digest)) {
            return false;
        }

        return $this->parseAuthData($digest);
    }
1223449
public function findRouteRequest(ServerRequestInterface $request): bool
    {
        /* @var $request \Rancoud\Http\Message\ServerRequest */
        $this->method = $request->getMethod();
        $this->url = $request->getUri()->getPath();
        $this->host = null;

        $serverParams = $request->getServerParams();
        if (isset($serverParams['HTTP_HOST'])) {
            $this->host = $serverParams['HTTP_HOST'];
        } elseif (isset($serverParams['SERVER_NAME'])) {
            $this->host = $serverParams['SERVER_NAME'];
        }

        return $this->find();
    }
679658
private function getOverrideMethod(ServerRequestInterface $request): string
    {
        if ($request->getMethod() === 'POST' && $this->parsedBodyParameter !== null) {
            $params = $request->getParsedBody();

            if (isset($params[$this->parsedBodyParameter])) {
                return strtoupper($params[$this->parsedBodyParameter]);
            }
        } elseif ($request->getMethod() === 'GET' && $this->queryParameter !== null) {
            $params = $request->getQueryParams();

            if (isset($params[$this->queryParameter])) {
                return strtoupper($params[$this->queryParameter]);
            }
        }

        return strtoupper($request->getHeaderLine(self::HEADER));
    }
624777
private function getTokenFromRequestBody(ServerRequestInterface $request): ?string
    {
        try {
            $parameters = RequestBodyParser::parseFormUrlEncoded($request);

            return $this->getAccessTokenFromParameters($parameters);
        } catch (\Exception $e) {
            return null;
        }
    }
942546
private function detectFromExtension(ServerRequestInterface $request)
    {
        $extension = \strtolower(\pathinfo($request->getUri()->getPath(), PATHINFO_EXTENSION));

        if (empty($extension)) {
            return null;
        }

        foreach ($this->formats as $format => $data) {
            if (\in_array($extension, $data['extension'], true)) {
                return $format;
            }
        }

        return null;
    }
969892
private function getTokenFromQuery(ServerRequestInterface $request): ?string
    {
        $query_params = $request->getQueryParams();

        return $this->getAccessTokenFromParameters($query_params);
    }
569623
public static function getRequestLine(ServerRequestInterface $request): string
    {
        return sprintf(
            '%s %s%s %s',
            self::getMethod($request),
            self::getPath($request),
            self::getQuery($request),
            self::getProtocol($request)
        );
    }
995152
public static String getFullRequestUrl(HttpServletRequest request) {
        StringBuilder buff = new StringBuilder(
                request.getRequestURL().toString());
        String queryString = request.getQueryString();
        if (queryString != null) {
            buff.append("?").append(queryString);
        }

        return buff.toString();
    }
23120
public static function getPath( RequestInterface $request ) {
		$url = $request->getUrl();
		$relative_url = substr( $url, strlen( home_url( '/' ) ) );
		$relative_url = static::addLeadingSlash( $relative_url );
		$relative_url = preg_replace( '~\?.*~', '', $relative_url );
		$relative_url = static::addTrailingSlash( $relative_url );
		return $relative_url;
	}