public function addHeader($key, $value = null, $toLower = true)
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $this->addHeader($k, $v);
            }
        } else {
            if ($value !== null) {
                if ($toLower === true) {
                    $key = strtolower($key);
                }
                if (!isset($this->_headers[$key])) {
                    $this->_headers[$key] = $value;
                } else {
                    if (is_array($this->_headers[$key])) {
                        $this->_headers[$key][] = $value;
                    } else {
                        $this->_headers[$key] = [$this->_headers[$key], $value];
                    }
                }
            }
        }
    }