Set or reset the headers

@param array $headers Array of headers
@param bool $reset    (Optional) Reset the existing headers

@return void
771688
public function setHeaders(array $headers, $append = false)
    {
        if (!$append) {
            $this->headers = $headers;
        } else {
            foreach ($headers as $field => $value) {
                $this->setHeader($field, $value);
            }
        }
    }
1363231
public function reset($reset_defaults = false)
  {
    $this->errors = null;
    $this->value  = null;

    if ($reset_defaults) {
      $this->default_value = null;
    }
  }
967225
public function addHeaders($headers = array())
    {
        foreach ($headers as $header => $value) {
            $this->addHeader($header, $value);
        }
    }
1096489
public function setHeaders($headers, $override = true)
    {
        if ($override == false) {
            $this->headers = array_merge($headers, $this->headers);
        } else {
            $this->headers = $headers;
        }

        return $this;
    }
1075211
public function resetHeaders() {
        $headers = $this->getSDK()->getOption('headers');
        $this->headers = array(
            'Accept' => $headers['accept'],
            'Content-Type' => $headers['content_type'],
            'User-Agent' => $headers['user_agent'],
        );
    }
1274629
public function setHeaders($headers)
    {
        $headerCollection = $this->getHeaderCollection();
        $headerCollection->removeAll();
        $headerCollection->fromArray($headers);
    }
130480
public function reset(){
        $this->status = NULL;
        $this->body = NULL;
        $this->headers = NULL;
        $this->info = array();
    }
870506
public function setHeaders(array $headers)
    {
        $cookies = $this->cookies;

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

            throw $e;
        }
    }
690773
public function setHeaders(array $headers)
    {
        array_walk($headers, function ($v, $k) {
            $this->validateArgument(
                'headers',
                $k,
                [ static::FILTER_EXCLUDE, static::FILTER_INCLUDE ]
            );
            if (!is_array($v)) {
                throw new InvalidArgumentException(
                    '$value must be an array with keys set to FILTER_EXCLUDE, '
                    . 'FILTER_INCLUDE and values set to an array of header '
                    . 'name => values'
                );
            }
        });
        $this->headers = $headers;
    }
362513
public static function setResponseHeaders($headers)
    {
        foreach ($headers as $name => $headerValues) {
            $header = $name . ": " . implode(", ", $headerValues);
            header($header);
        }
    }
199676
public function reset()
    {
        $this->headers = [];
        $this->request = null;
        $this->response = null;
        $this->multipartStreamBuilder = null;

        foreach ($this->resources as $resource) {
            if (is_resource($resource)) {
                fclose($resource);
            }
        }

        $this->resources = [];
    }
334721
public function setHosts(array $stubs, $reset = false) {
		if ($reset) {
			$this->_hosts = [];
		}
		foreach ($stubs as $stub) {
			$slug = $this->_slug($stub['name']);
			$this->_hosts[$slug] = $stub;
		}
		return $this;
	}
651048
public function setHeaders($headers)
    {
        foreach ($headers as $key => $value) {
            $this->headers[$key] = $value;
        }

        $headers = array();
        foreach ($this->headers as $key => $value) {
            $headers[] = $key . ': ' . $value;
        }
        $this->setOpt(CURLOPT_HTTPHEADER, $headers);
    }
1020802
public function setHeaders($headers) 
    {

       if(!$this->_parserObj) {
           $this->initParser($this->getRespondType());

        }

        /** @var array  _headers */
        $this->_headers = $this->getParser()->getHeaders();
        $this->_headers = array_merge($this->_headers,$headers);
    }
1182217
public function setHeaders($headers)
    {
        if (!empty($this->headers)) {
            $this->headers = array_merge($this->headers, $headers);
        } else {
            $this->headers = $headers;
        }
        $this->headers = array_merge($this->headers, $headers);

        if ($this->client instanceof \swoole_http_client) {
            $this->client->setHeaders($this->headers);
        }
        return $this;
    }
1339310
protected function setHeaders($headers)
    {
        foreach ($headers as $name => $value) {

            //~ Convert to array
            if (!is_array($value)) {
                $value = [$value];
            }

            //~ Clean values
            foreach ($value as $key => $val) {
                $value[$key] = trim($val);
            }

            $this->headersOriginal[$name]     = $value;
            $this->headers[strtolower($name)] = $value;
        }

        return $this;
    }
376545
public function setHeaders(array $headers)
    {
        foreach ($headers as $key => $value) {
            $this->headers[$key] = $value;
        }

        return $this;
    }