Set a header. If it already exists the value is overwritten with the
new one.

@param string     $keyName the name of the header
@param string|int $value   the value of the header
19379
public function setHeader($keyName, $value)
    {
        $normalizedKeyName = self::normalizeHeaderKeyName($keyName);
        $this->headers[$normalizedKeyName] = $value;
    }
252432
final public static function set($key, $value)
	{
		self::_checkInstance();
		self::$_instance->offsetSet($key, $value);
	}
1125805
protected function _setHeader($header, $value)
    {
        $normalized = strtolower($header);
        $this->headerNames[$normalized] = $header;
        $this->headers[$header] = [$value];
    }
814033
public function addHeader($name, $value)
    {
        if (isset($this->headers[$name])) {
            if (is_array($this->headers[$name])) {
                $this->headers[$name][] = $value;
            } else {
                $this->headers[$name] = $value;
            }
        } else {
            $this->headers[$name] = [$value];
        }

        return $this;
    }
1125605
public function setHeader($key, $value)
    {
        $this->headers[$key] = $value;

        //Headers can't be passed as key: value associative array
        $tmpHeaders = array();
        foreach($this->headers as $tmpKey => $tmpValue)
        {
            $tmpHeaders[] = "$tmpKey: $tmpValue";
        }

        curl_setopt($this->handle, CURLOPT_HTTPHEADER, $tmpHeaders);
    }
52878
static public function set($key, $value) {
        $config = &self::$_config;
        
        Utils::arraySet($config, $key, $value);
    }
1023960
protected function setHeader($name, $value)
    {
        if (! is_array($value)) {
            $value = [$value];
        }
        $this->headers[$name] = $value;
        $this->headerKeys[strtolower($name)] = $name;
    }
1330929
public function set(string $name, string $value): void
    {
        $key = strtolower($name);
        $this->headers[$key] = [$name, $value];
    }
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;
        }
    }
1296729
public function setHeader($name, $value)
    {
        if (isset($this->headers[$name])) {
            if (is_array($this->headers[$name])) {
                $this->headers[$name] = (array)$value;
            } else {
                $this->headers[$name] = $value;
            }
        } else {
            $this->headers[$name] = (array)$value;
        }

        return $this;
    }
978504
public function setHeader(string $key, string $value): void
    {
        $this->buildStructuredHeaders();
        $lkey = strtolower($key);
        if (isset($this->structuredHeaders[$lkey])) {
            $this->structuredHeaders[$lkey]['value'] = $value;
        } else {
            $newHeader = array('key' => $key, 'value' => $value);
            $this->structuredHeaders[$lkey] = $newHeader;
        }
        $this->storeStructuredHeader();
    }
402321
public function header( string$key, string$value ):self
	{
		$this->headers[ucwords( strtolower($key), '-' )]= $value;

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

        return $this;
    }
1175928
public final function setHeader($name, $value)
    {
        self::checkString($name);
        self::checkString($value);

        $this->_headers[$name] = $value;
    }
1261506
protected function setHeader(string $name, string $value)
    {
        $normalized = $this->normalizeHeaderKey($name);
        $this->headerNames[$normalized] = $name;
        $this->headers[$name] = $this->trimHeaderValues([$value]);
    }
11631
public function withHeader(string $key, string $value): void
    {
        $this->headers[$key] = $value;
    }
2253
public function addRequestHeader($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $newKey => $newValue) {
                $this->addRequestHeader($newKey, $newValue);
            }
        } else {
            $key = preg_replace_callback(
                '/([\s\-_]|^)([a-z0-9-_])/',
                function ($match) {
                    return strtoupper($match[0]);
                },
                $key
            );
            $this->requestHeader[] = "$key: $value";
        }
    }