public static function renderRequestHeaders(RequestInterface $request): string
    {
        $renderedHeaders = '';
        $headers = $request->getHeaders();
        if ($headers instanceof Headers) {
            $renderedHeaders .= $headers->__toString();
        } else {
            foreach (array_keys($headers) as $name) {
                $renderedHeaders .= $request->getHeaderLine($name);
            }
        }

        return $renderedHeaders;
    }