protected function getHeadersPrepared() {
        $cookiesData = $this->getCookiesPrepared();
        foreach ($cookiesData as $cookieStr) {
            $this->headers->add('Set-Cookie', $cookieStr);
        }
        $headersArray = [];
        if ($this->_headers) {
            foreach ($this->getHeaders() as $name => $values) {
                $name = str_replace(' ', '-', ucwords(str_replace('-', ' ', $name)));
                if (!isset($headersArray[$name])) {
                    $headersArray[$name] = [];
                }
                foreach ($values as $value) {
                    $headersArray[$name][] = $value;
                }
            }
        }
        return $headersArray;
    }
protected function getHeadersPrepared() {
        $cookiesData = $this->getCookiesPrepared();
        foreach ($cookiesData as $cookieStr) {
            $this->headers->add('Set-Cookie', $cookieStr);
        }
        $headersArray = [];
        if ($this->_headers) {
            foreach ($this->getHeaders() as $name => $values) {
                $name = str_replace(' ', '-', ucwords(str_replace('-', ' ', $name)));
                if (!isset($headersArray[$name])) {
                    $headersArray[$name] = [];
                }
                foreach ($values as $value) {
                    $headersArray[$name][] = $value;
                }
            }
        }
        return $headersArray;
    }
protected function getHeadersPrepared ( ) { $ cookiesData = $ this -> getCookiesPrepared ( ) ; foreach ( $ cookiesData as $ cookieStr ) { $ this -> headers -> add ( 'Set-Cookie' , $ cookieStr ) ; } $ headersArray = [ ] ; if ( $ this -> _headers ) { foreach ( $ this -> getHeaders ( ) as $ name => $ values ) { $ name = str_replace ( ' ' , '-' , ucwords ( str_replace ( '-' , ' ' , $ name ) ) ) ; if ( ! isset ( $ headersArray [ $ name ] ) ) { $ headersArray [ $ name ] = [ ] ; } foreach ( $ values as $ value ) { $ headersArray [ $ name ] [ ] = $ value ; } } } return $ headersArray ; }
Get prepared headers array
@return array
@throws InvalidConfigException
Get prepared headers array