Sets a header value for a given header name.
This replaces the value of an already existing header.

@param name  name of the header
@param value value of the header
555519
public void setHeader(String name, String value) {
        httpRequest.headers().set(name, value);
    }
1309583
@Override
	public void setDateHeader(final String name, final long value) {
		headers.put(name, String.valueOf(value));
	}
861808
@JsonAnySetter
    public void set(final String name, final String value) {
        other.put(name, value);
    }
58984
public void setHeader(String name, String value) {
		if(logger.isDebugEnabled()) {
        	logger.debug("setHeader - name=" + name + ", value=" + value);
        }

		if(name == null) {
			throw new NullPointerException ("name parameter is null");
		}
		if(value == null) {
			throw new NullPointerException ("value parameter is null");
		}
		if (isSystemHeader(getModifiableRule(name))) {
			throw new IllegalArgumentException(name + " is a system header !");
		}
		checkCommitted();

		try {
			// Dealing with Allow:INVITE, ACK, CANCEL, OPTIONS, BYE kind of headers
			if(JainSipUtils.LIST_HEADER_NAMES.contains(name)) {
				this.message.removeHeader(name);
				List<Header> headers = SipFactory.getInstance().createHeaderFactory()
					.createHeaders(name + ":" + value);
				for (Header header : headers) {
					this.message.addHeader(header);
				}
			} else {
				// dealing with non list headers and extension header
				Header header = SipFactory.getInstance().createHeaderFactory()
					.createHeader(name, value);
				this.message.setHeader(header);
			}
		} catch (Exception e) {
			throw new IllegalArgumentException("Error creating header!", e);
		}
	}
1032088
public String putHeader(final String name, final String value) {
        if (headers == null) {
            headers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
        }
        return headers.put(name, value);
    }
1259108
public void addSetCookie(String name,
                             String value)
    {
        _header.addSetCookie(new Cookie(name,value));
    }
957374
public final void setParameter(String name, Object value) {
        if (isNative()) {
            bindParameters.add(new BindParameter(name, value));
        } else {
            setParameterValue(":" + name, value);
        }

        parametersMap.put(":" + name, value);
    }
1252561
protected function addResponseHeader(string $name, string $value = '') : void
    {
        $this->response = $this->response->withAddedHeader($name, $value);
    }
396651
public static Header of(String name, String value) {
        return new Header(requireNonNull(name), requireNonNull(value));
    }
246817
public void addHeader(String name, String value) {
		if(logger.isDebugEnabled()) {
			logger.debug("addHeader - name=" + name + ", value=" + value);
		}

		checkCommitted();
		addHeaderInternal(name, value, false);
	}
1366500
public T header(Header name, String value) {
		return header(name.toString(), value, true);
	}
673620
public function addHeader($name, $value)
    {
        Validate::isString($name, 'name');
        Validate::isString($value, 'value');

        $this->_headers[$name] = $value;
    }
666568
public function setHeader(string $name, string $value): void
    {
        $this->headers->set($name, $value);
    }
859381
public void includeRequestHeader(String name, String value) {
        checkUpdatable();
        this.headers.put(name, value);
    }
916819
@Override
	public void setHeader(final String name, final String value) {
		LOG.debug("Setting header, " + name + '=' + value);
		headers.put(name, value);
	}
1364596
public final B setHeader(CharSequence name, Object value) {
        requireNonNull(name, "name");
        requireNonNull(value, "value");
        getOrCreateHeaders().setObject(HttpHeaderNames.of(name), value);
        return self();
    }
972103
public HttpHubConnectionBuilder withHeader(String name, String value) {
        if (headers == null) {
            this.headers = new HashMap<>();
        }
        this.headers.put(name, value);
        return this;
    }