src/RequestConvertor.php
protected function setRequestHeaders(ServerRequestInterface $baseRequest, array $params)
    {
        $headers = (new ServerRequest())->withServerParams($params)->getHeaders();
        $psrRequest = $baseRequest;

        foreach ($headers as $header => $values) {
            $psrRequest = $psrRequest->withHeader($header, $values);
        }
        
        return $psrRequest;
    }
protected function setRequestHeaders(ServerRequestInterface $baseRequest, array $params)
    {
        $headers = (new ServerRequest())->withServerParams($params)->getHeaders();
        $psrRequest = $baseRequest;

        foreach ($headers as $header => $values) {
            $psrRequest = $psrRequest->withHeader($header, $values);
        }
        
        return $psrRequest;
    }
protected function setRequestHeaders ( ServerRequestInterface $ baseRequest , array $ params ) { $ headers = ( new ServerRequest ( ) ) -> withServerParams ( $ params ) -> getHeaders ( ) ; $ psrRequest = $ baseRequest ; foreach ( $ headers as $ header => $ values ) { $ psrRequest = $ psrRequest -> withHeader ( $ header , $ values ) ; } return $ psrRequest ; }
Set the request headers

@param ServerRequestInterface $baseRequest
@param array                  $params
@retrun ServerRequestInterface
Set the request headers