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;
    }
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;
    }
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 ; }
Renders the HTTP headers - EXCLUDING the status header - of the given request

@param RequestInterface $request
@return string
Renders the HTTP headers - EXCLUDING the status header - of the given request