Adds an HTTP header to the current response.

@param string @name The name of the HTTP header to add value to.
@param string @value The string to add to the header.

@return void
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;
        }
    }
238412
public function sendHeader(string $name, ?string $value): void
    {
        if (headers_sent($file, $line)) {
            throw new HttpException(sprintf("Cannot use '%s()', headers already sent in %s:%s",
                __method__, $file, $line));
        }

        // null means remove
        if ($value === null) {
            $this->removeHeader($name);
            header_remove($name);
        } else {
            $this->setHeader($name, $value);
            header(sprintf('%s: %s', $name, $value));
        }
    }
1347047
public void addHeader(String name, String value) {
        headerEntries.add(new HeaderEntry(name, value));
    }
1171383
public void addHeader(String name, String value) {
        if (name == null || name.trim().length() == 0) {
            throw new IllegalArgumentException("The header name must not be null or empty.");
        }

        if (value == null) {
            throw new IllegalArgumentException("The header value must not be null.");
        }

        this.headers.put(name, value);
    }
631265
public function add(string $name, $value): void
	{
		Arr::set($this->parameters, $name, $value);
	}
256493
public function add(string $name, string $value): void
	{
		$this->headers[$this->normalizeName($name)] = $value;
	}
527266
@Override
    public void addIntHeader(String name, int value) {

        addHeader(name, String.valueOf(value));
    }
1252561
protected function addResponseHeader(string $name, string $value = '') : void
    {
        $this->response = $this->response->withAddedHeader($name, $value);
    }
676975
def add_header(self, name, value):
        '''
        '''
        if self.headers is None:
            self.headers = []
        self.headers.append(dict(Name=name, Value=value))
253088
public void addHeader(String name, String value) {
        httpRequest.headers().add(name, value);
    }
39992
public function header(string $name, $value): HttpRequest
    {
        if (!array_key_exists($name, $this->headers)) {
            $this->headers[$name] = array();
        }
        $this->headers[$name][] = $value;

        return $this;
    }
649122
public function set(string $header, string $value) : void
    {
        $this->headers[$header] = $value;
    }
456398
public void addHeader(String name, String value) 
    {
        try{_httpResponse.addField(name,value);}
        catch(IllegalStateException e){LogSupport.ignore(log,e);}
    }
997985
protected function addHeader(string $name, $value)
    {
        \assert($this->isNameValid($name), "Invalid header name");

        if (\is_array($value)) {
            if (!$value) {
                return;
            }

            $value = \array_values(\array_map("strval", $value));
        } else {
            $value = [(string) $value];
        }

        \assert($this->isValueValid($value), "Invalid header value");

        $name = \strtolower($name);
        if (isset($this->headers[$name])) {
            $this->headers[$name] = \array_merge($this->headers[$name], $value);
        } else {
            $this->headers[$name] = $value;
        }
    }
97029
public function addHeader(string $name, $value)
    {
        parent::addHeader($name, $value);

        if (\stripos($name, "cookie") === 0) {
            $this->setCookiesFromHeaders();
        }
    }
220400
public function add(string $name, $value): self
    {
        $this->headers[$name] = $value;
        return $this;
    }
511624
public B addHttpHeader(CharSequence name, Object value) {
        requireNonNull(name, "name");
        requireNonNull(value, "value");
        httpHeaders.addObject(HttpHeaderNames.of(name), value);
        return self();
    }