public function setHeaders(array $fields, $merge = false)
    {
        if ($merge) {
            $this->headers = array_merge($this->headers, $fields);
        } else {
            $this->headers = $fields;
        }

        return $this;
    }
public function setHeaders(array $fields, $merge = false)
    {
        if ($merge) {
            $this->headers = array_merge($this->headers, $fields);
        } else {
            $this->headers = $fields;
        }

        return $this;
    }
public function setHeaders ( array $ fields , $ merge = false ) { if ( $ merge ) { $ this -> headers = array_merge ( $ this -> headers , $ fields ) ; } else { $ this -> headers = $ fields ; } return $ this ; }
Set multiple headers.

<code>
$headers = [
'X-Foo' => 'bar',
'Content-Type' => 'application/json',
];

$curl->addMultiple($headers);
</code>

@param array $fields
@param bool $merge

@return $this
Set multiple headers .