public function setHeaders(array $headers)
    {
        $cookies = $this->cookies;

        try {
            parent::setHeaders($headers);
        } catch (\Throwable $e) {
            $this->cookies = $cookies;

            throw $e;
        }
    }
public function setHeaders(array $headers)
    {
        $cookies = $this->cookies;

        try {
            parent::setHeaders($headers);
        } catch (\Throwable $e) {
            $this->cookies = $cookies;

            throw $e;
        }
    }
public function setHeaders ( array $ headers ) { $ cookies = $ this -> cookies ; try { parent :: setHeaders ( $ headers ) ; } catch ( \ Throwable $ e ) { $ this -> cookies = $ cookies ; throw $ e ; } }
Sets the headers from the given array. Any cookie headers will automatically populate the contained array of
ResponseCookie objects.

@param string[]|string[][] $headers
Sets the headers from the given array . Any cookie headers will automatically populate the contained array of ResponseCookie objects .