Headers to add to the request.

@param $key
@param $value

@return $this
436433
public function addHeader($key, $value)
    {
        $this->options[GuzzleRequestOptions::HEADERS][$key] = $value;

        return $this;
    }
470713
public function set( $key, $value ) {
		$key = $this->addKeyprefixIfNeeded( $key );
		$this->params[$key] = $value;
		return $this;
	}
978397
protected function addDataInternal($value, $key) {
        if (null === $value || null === $key) {
            return $this;
        }
        $key = $this->processKey($key);
        if ($this->type === static::TYPE_DEFINED_ONLY && !array_key_exists($key, $this->shared)) {
            return $this;
        }
        return $this->addDataByScenario($value, $key);
    }
1299950
protected function withHeader($name, $value)
    {
        $this->headers[ strtolower($name) ] = is_array($value)
            ? $value
            : [ $value ];

        return $this;
    }
588740
public function setHeaders($key, $value = null)
    {
        if (is_array($key)) {
            $this->headers = $key;
            return $this;
        }

        $this->headers[] = $key.': '.$value;
        return $this;
    }
206146
public function add($key, $value): self
    {
        if (is_array($key)) {
            @ [$key, $value] = $key;
        }

        return $this->set($key, $value);
    }
709757
public function withAddedHeader($header, $value)
    {
        if ($this->complete) {
            return $this;
        }

        $new = $this->psrResponse->withAddedHeader($header, $value);
        return new self($new);
    }
686808
public function addHeader($name, $value = null)
    {
        if (is_numeric($name)) {
            $status = $this->getStatus($name);
            if (!empty($status)) {
                $this->headers[] = "{$_SERVER['SERVER_PROTOCOL']} $name $status";
            }
        } elseif (isset($value)) {
            $this->headers[] = "$name: $value";
        }

        return $this;
    }
721178
public function header( $key, $value = null ) {

		$key = explode( '-', $key );
		foreach( $key as $k => $v ) {
			$key[$k] = ucfirst( strtolower($v));
		}
		$key = implode( '-', $key );

		if ( !is_null( $value ) ) {
			$this->_headers[$key] = $value;
		}

		return $this->_headers[$key];
	}
1189221
public function setHeader($header, $value = null)
    {
        if (is_string($header)) {
            $this->headers[$header] = $value;
        }

        return $this;
    }
401413
public function addHeader($header, $value)
    {
        $name = strtolower($header);

        if(is_array($value))
        {
            foreach($value as $v)
                $this->headers[$name][] = trim($v);

            foreach(array_keys($this->headerLines) as $key)
                if(strtolower($key) == $name)
                    unset($this->headerLines[$key]);

            $this->headerLines[$header] = $this->headers[$name];
        }
        else
        {
            $this->headers[$name][] = trim($value);

            foreach(array_keys($this->headerLines) as $key)
                if(strtolower($key) == $name)
                    unset($this->headerLines[$key]);

            $this->headerLines[$header] = $this->headers[$name];
        }

        return $this;
    }
6901
public function addHeader($key, $value) {

		if(false === is_string($key)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($key)), E_USER_ERROR);
		}

		if(false === is_string($value)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($value)), E_USER_ERROR);
		}

		if(false === isset($this -> headers['custom'])) {
			$this -> headers['custom'] = [];
		}

		$this -> headers['custom'][$key] = $value;
	}
1267486
public function addHeader ($header, $value = null)
		{
			if ($value)
				$this->_headers[] = "$header: $value";
			else
				$this->_headers[] = $header;

			return $this;
		}
1105629
public function header($key, $value = null)
	{
		if( is_null($value) )
		{
			$pos = strpos($key, ":");
			if( ! $pos )
			{
				return $this;
			}

			$value = substr($key, $pos + 1);
			$key = substr($key, 0, $pos);
		}
		$this->headers->set($key, $value);
		return $this;
	}
422629
public function addAdditionalHeader(string $key, string $value): self
    {
        $this->additionalHeaders[$key] = $value;

        return $this;
    }
81725
public function setHeader(string $key, $value) : Response
    {
        $this->headers->set($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);
            }
        }
    }