Replace all previous headers with this one.

@param $key
@param $value
496004
public function set($key, $value) {
        $key = $this->formatKey($key);
        array_set($this->headers, $key, [$value]);
    }
1057351
public function setHeader($key, $value, $replace = true, $http_response_code = null)
    {
        $this->swooleResponse->header($key. $value);
    }
1262582
public function set($key, $value) {
		
		$previous = $this->get($key);
		
		parent::set($key, $value);
		
		return $previous;
	}
904934
private function replace($key, $value)
  {
    if (is_array($value)) return $this->cleanData($value);

    return $this->transform($key, $value);
  }
1238947
public function setHeaderClaim(string $key, $value): self
    {
        $this->header[$key] = $value;

        return $this;
    }
433647
protected function setHeader($key, $value)
    {
        if (SERVER_MODE === 'swoole') {
            $GLOBALS['__$response']->header($key, $value);
        } else {
            if (!headers_sent()) {
                header($key . ': '. $value);
            }
        }
    }
1267486
public function addHeader ($header, $value = null)
		{
			if ($value)
				$this->_headers[] = "$header: $value";
			else
				$this->_headers[] = $header;

			return $this;
		}
639323
public function header($key, $values, $replace = true)
    {
        $this->headers->set($key, $values, $replace);

        return $this;
    }
559866
protected function setKey($key, $value)
    {
        $key = strtolower((string)$key);
        $this->keys[$key] = (string)$value;
    }
402321
public function header( string$key, string$value ):self
	{
		$this->headers[ucwords( strtolower($key), '-' )]= $value;

		return $this;
	}
11631
public function withHeader(string $key, string $value): void
    {
        $this->headers[$key] = $value;
    }
925473
public function add(string $key, string $value): HeaderCollection
    {
        return $this->addMultiple([$key => $value]);
    }
1170565
public function set(string $key, $value)
    {
        parent::set(Formater::normalize($key), [
            'key' => $key,
            'value' => $value
        ]);
    }
590599
public function prepend($key, $value)
    {
        $config = $this->get($key);

        $this->setSingleItem($key, \array_unshift($config, $value));
    }
672165
public function replace($name, $value = '')
    {
        Types::assert(['string' => [$name, $value]]);

        $header = HeaderFactory::build($name, $value);
        $this->headers[strtolower($name)] = [$header];
    }
186476
public function addDefaultHeader($key, $value) {
		if (!is_string($key)) {
			throw new \InvalidArgumentException('The header key must be a string.');
		}

		$defaultHeaders[$key] = $value;
		return $this;
	}
27274
public function replaceValue($key, $value): bool {
        $replaced = false;
        $node = $this->getHead();
        while ($node !== null) {
            if (Comparator::equals($node->getKey(), $key)) {
                $node->setValue($value);
                $replaced = true;
            }
            $node = $node->getNext();
        }
        return $replaced;
    }