protected function transformRequestHeadersToString(RequestInterface $request): string
    {
        $message = vsprintf('%s %s HTTP/%s', [
            strtoupper($request->getMethod()),
            $request->getRequestTarget(),
            $request->getProtocolVersion(),
        ])."\r\n";

        foreach ($request->getHeaders() as $name => $values) {
            $message .= $name.': '.implode(', ', $values)."\r\n";
        }

        $message .= "\r\n";

        return $message;
    }
protected function transformRequestHeadersToString(RequestInterface $request): string
    {
        $message = vsprintf('%s %s HTTP/%s', [
            strtoupper($request->getMethod()),
            $request->getRequestTarget(),
            $request->getProtocolVersion(),
        ])."\r\n";

        foreach ($request->getHeaders() as $name => $values) {
            $message .= $name.': '.implode(', ', $values)."\r\n";
        }

        $message .= "\r\n";

        return $message;
    }
protected function transformRequestHeadersToString ( RequestInterface $ request ) : string { $ message = vsprintf ( '%s %s HTTP/%s' , [ strtoupper ( $ request -> getMethod ( ) ) , $ request -> getRequestTarget ( ) , $ request -> getProtocolVersion ( ) , ] ) . "\r\n" ; foreach ( $ request -> getHeaders ( ) as $ name => $ values ) { $ message .= $ name . ': ' . implode ( ', ' , $ values ) . "\r\n" ; } $ message .= "\r\n" ; return $ message ; }
Produce the header of request as a string based on a PSR Request.
Produce the header of request as a string based on a PSR Request .