Add header.

@param $key
@param $value
483008
public function add($key, $value) {
        $key = $this->formatKey($key);
        $headers = $this->get($key);

        $headers[] = $value;

        array_set($this->headers, $key, $headers);
    }
404742
public function setHeader( $key, $value )
	{
		if( !in_array( $key, $this->headers ) )
			throw new InvalidArgumentException( "Unsupported Header '".$key."'" );
		$children	=& $this->tree->getChildren();
		$head		=& $children[0];
		$node		= new XML_DOM_Node( $key, $value );
		$head->addChild( $node );
	}
925473
public function add(string $key, string $value): HeaderCollection
    {
        return $this->addMultiple([$key => $value]);
    }
393434
public function setHeader($key, $value)
    {
        $this->headers[$key] = $value;
        $headers = array();
        foreach ($this->headers as $key => $value) {
            $headers[] = $key . ': ' . $value;
        }
        $this->setOpt(CURLOPT_HTTPHEADER, $headers);
    }
402321
public function header( string$key, string$value ):self
	{
		$this->headers[ucwords( strtolower($key), '-' )]= $value;

		return $this;
	}
960657
public function addHeader($name, $value = null) {
        if ($this->canSetHeaders()) {
            if ($value === null) {
                $value = trim(substr($name, strpos($name, ':') + 1));
                $name = trim(substr($name, 0, strpos($name, ':')));
            }

            $this->headers[$name] = $value;
        }
    }
1223075
public function setHeaders($key, $value = null)
    {
        Argument::i()
            //argument 1 must be a string or array
            ->test(1, 'array', 'string')
            //argument 2 must be scalar or null
            ->test(2, 'scalar', 'null');

        if (is_array($key)) {
            $this->headers = $key;
            return $this;
        }

        $this->headers[] = $key.': '.$value;
        return $this;
    }
137863
public function setHeader($key, $value)
    {
        $this->_headers[$key] = $key.': '.$value;
        $this->setopt(CURLOPT_HTTPHEADER, array_values($this->_headers));
    }
952285
public function usingHeader(string $key, $value): self
    {
        $this->headers->put($key, $value);
        return $this;
    }
673620
public function addHeader($name, $value)
    {
        Validate::isString($name, 'name');
        Validate::isString($value, 'value');

        $this->_headers[$name] = $value;
    }
1221310
public function setHeader(string $header, string $value)
  {
    $found = false;
    # Traverse the headers, searching for a matching header (case insensitive)
    foreach ( $this->headers as $idx => $oldValue )
    {
      if (strcasecmp($this->headers[$idx],$header)==0)
      {
        # Found the header, now replace the value
        $found = true;
        $this->headers[$idx] = $value;
        break;
      }
    }
    # Add the header
    if (!$found) {
      $this->headers[$header] = $value;
    }

    return $this;
  }
450822
public function andHeader($header, $value)
    {
        $this->headers->setHeader(
            new Header(new HeaderName($header), new HeaderValue($value))
        );

        return $this;
    }
780094
public function add(string $name, string $value): void
    {
        $key = strtolower($name);
        if (!isset($this->headers[$key])) {
            $this->headers[$key] = [$name, $value];

            return;
        }

        $this->headers[$key] = [$name, $this->headers[$key][1] . ', ' . $value];
    }
857390
public void addAdditionalHeader(String key, String value)
    {
        if (this.additionalHeader == null)
        {
            this.additionalHeader = Maps.newLinkedHashMap();
        }

        this.additionalHeader.put(key, value);
    }
1271178
public function addHeader($name, $value)
    {
        $name = strtolower($name);
        $this->headers[$name] = $value;
        return $this;
    }
1035048
public function setHeader($key, $value, $http_response_code = null)
    {
        header($key.': '.$value, null, $http_response_code);
    }
240160
public function header($key, $value=null,$http_response_code=null) {
        if($value) {
            $key = $key.':'.$value;
        }
        headers_sent() or header($key,true,$http_response_code);
    }