public function setHeaders(array $headers = []): Headers
    {
        $this->headers = array();

        foreach ($headers as $header => $data) {
            $this->setHeader((string)$header, (string)$data);
        }

        return $this;
    }
public function setHeaders(array $headers = []): Headers
    {
        $this->headers = array();

        foreach ($headers as $header => $data) {
            $this->setHeader((string)$header, (string)$data);
        }

        return $this;
    }
public function setHeaders ( array $ headers = [ ] ) : Headers { $ this -> headers = array ( ) ; foreach ( $ headers as $ header => $ data ) { $ this -> setHeader ( ( string ) $ header , ( string ) $ data ) ; } return $ this ; }
Set headers array. Old headers will be removed

@param array $headers Array of header -> data pairs

@return Headers
Set headers array . Old headers will be removed