src/Headers.php
public static function toArray($headers, $options = [])
    {
        $data = [];
        foreach ($headers as $name => $header) {
            if (strtolower($name) === 'set-cookie') {
                foreach ($header->data() as $value) {
                    $data[] = $name . ': ' . $value;
                }
            } else {
                $data[] = $name . ': ' . $header->value();
            }
        }
        return $data;
    }
public static function toArray($headers, $options = [])
    {
        $data = [];
        foreach ($headers as $name => $header) {
            if (strtolower($name) === 'set-cookie') {
                foreach ($header->data() as $value) {
                    $data[] = $name . ': ' . $value;
                }
            } else {
                $data[] = $name . ': ' . $header->value();
            }
        }
        return $data;
    }
public static function toArray ( $ headers , $ options = [ ] ) { $ data = [ ] ; foreach ( $ headers as $ name => $ header ) { if ( strtolower ( $ name ) === 'set-cookie' ) { foreach ( $ header -> data ( ) as $ value ) { $ data [ ] = $ name . ': ' . $ value ; } } else { $ data [ ] = $ name . ': ' . $ header -> value ( ) ; } } return $ data ; }
Gets the headers as an array.

@return array Returns the headers.
Gets the headers as an array .