public function setHeaders(array $headers, $append = false)
    {
        if (!$append) {
            $this->headers = $headers;
        } else {
            foreach ($headers as $field => $value) {
                $this->setHeader($field, $value);
            }
        }
    }