Adds an HTTP header.
@access		public
@param		string		$name		HTTP header name
@param		string		$value		HTTP header value
@return		void
179410
public function addHeaderPair( $name, $value, $emptyBefore = NULL )
	{
		$this->headers->setField( new Net_HTTP_Header_Field( $name, $value ), $emptyBefore );
	}
375419
public function addHeader(string $header, string $value): self
    {
        $this->headers[$header] = $value;

        return $this;
    }
256493
public function add(string $name, string $value): void
	{
		$this->headers[$this->normalizeName($name)] = $value;
	}
132901
public function withHeader(string $name, string $value)
    {
        $this->defaultHeaders[$name] = $value;

        return $this;
    }
495130
public function addDefaultHeader($name, $value)
    {
        if (!isset($this->headers[$name])) {
            $this->headers[$name] = $value;
        }

        return $this;
    }
246817
public void addHeader(String name, String value) {
		if(logger.isDebugEnabled()) {
			logger.debug("addHeader - name=" + name + ", value=" + value);
		}

		checkCommitted();
		addHeaderInternal(name, value, false);
	}
1186051
public void addHeader(String name, String value) {
	headers = ReqRspUtil.add(headers, name, value);
    }
1299950
protected function withHeader($name, $value)
    {
        $this->headers[ strtolower($name) ] = is_array($value)
            ? $value
            : [ $value ];

        return $this;
    }
430100
protected void header(String name, String value){
        RequestContext.getHttpResponse().addHeader(name, value);
    }
578501
protected function setHeader(string $name, $value)
    {
        if (!$this->isHeaderNameValid($name)) {
            throw new InvalidHeaderException('Header name is invalid.');
        }

        $normalized = strtolower($name);
        $value = $this->filterHeader($value);

        // Header may have been previously set with a different case. If so, remove that header.
        if (isset($this->headerNameMap[$normalized]) && $this->headerNameMap[$normalized] !== $name) {
            unset($this->headers[$this->headerNameMap[$normalized]]);
        }

        $this->headerNameMap[$normalized] = $name;
        $this->headers[$name] = $value;
    }
666568
public function setHeader(string $name, string $value): void
    {
        $this->headers->set($name, $value);
    }
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];
    }
1330929
public function set(string $name, string $value): void
    {
        $key = strtolower($name);
        $this->headers[$key] = [$name, $value];
    }
664652
public function addHeader( $name, $value )
	{
		$hs = $this->object->getHeaders();
		$hs->addTextHeader( $name, $value );
		return $this;
	}
502710
public final function setHeader(string $name, ?string $value): self
    {
        if ($this->type == self::TYPE_REQUEST) {
            throw new HttpException('You cannot modify request headers');
        }

        $this->headers[$name] = $value;

        return $this;
    }
865785
public final function header(string $name, string $value = null)
    {
        return ($value === null) ? $this->getHeader($name) : $this->setHeader($name, $value);
    }
15015
public function addHeaderIfNotExist(string $name, string $value) : self
    {
        $name = $this->normalizeHeader($name);
        if (isset($this->headers[$name])) {
            return $this;
        }

        $this->headers[$name] = $value;

        return $this;
    }