Replace the the given header by the given value.
-param {String} name header name
-param {String | Array} value header value
496018
function(name, value) {
    var regexp, idx;

    // Remove the header from extraHeaders if present.
    regexp = new RegExp('^\\s*'+ name +'\\s*:','i');
    for (idx=0; idx<this.extraHeaders.length; idx++) {
      if (regexp.test(this.extraHeaders[idx])) {
        this.extraHeaders.splice(idx, 1);
      }
    }

    this.headers[Utils.headerize(name)] = (Array.isArray(value)) ? value : [value];
  }
1121748
def addHeader(self, name, value, must_understand=False):
        
        self.headers[name] = value
        self.headers.set_required(name, must_understand)
1330929
public function set(string $name, string $value): void
    {
        $key = strtolower($name);
        $this->headers[$key] = [$name, $value];
    }
1336000
public Response header(String name, String value) {
        checkCommitted();

        getHeaderMap().put(name, value);

        return this;
    }
782504
public RestRequest<T> addHeader(String name, String value) {
        headers.put(name, value);
        return this;
    }
253088
public void addHeader(String name, String value) {
        httpRequest.headers().add(name, value);
    }
1299950
protected function withHeader($name, $value)
    {
        $this->headers[ strtolower($name) ] = is_array($value)
            ? $value
            : [ $value ];

        return $this;
    }
1241941
public T header(String name, String value) {
        connection.setRequestProperty(name, value);
        return (T) this;
    }
957575
public function setHeader($name, $value, $replace=true)
    {
        if ($replace) {
            $this->removeHeader($name);
        }
        $this->_headers[] = [$name, $value];
    }
151167
function setWritableHeader(res, name, value) {

  if (res._headerSent && res.finished) {
    return false;
  }

  res.setHeader(name, value);
  return true;
}
1335473
public void set(String name, String value)
    {
        HeaderName hn = getHeaderName(name);
        set(hn, value);
    }
396651
public static Header of(String name, String value) {
        return new Header(requireNonNull(name), requireNonNull(value));
    }
1254439
public function addCustomHeader($name, $value = null)
    {
        if (null === $value) {
            // Value passed in as name:value
            $this->CustomHeader[] = explode(':', $name, 2);
        } else {
            $this->CustomHeader[] = [$name, $value];
        }
    }
677245
function( name, value ) {
					if ( completed == null ) {
						name = requestHeadersNames[ name.toLowerCase() ] =
							requestHeadersNames[ name.toLowerCase() ] || name;
						requestHeaders[ name ] = value;
					}
					return this;
				}
1081572
def set_header(self, name, value):
        
        self._headers[_hkey(name)] = [_hval(value)]
428652
def add_header(self, name: str, value: _HeaderTypes) -> None:
        
        self._headers.add(name, self._convert_header_value(value))
246817
public void addHeader(String name, String value) {
		if(logger.isDebugEnabled()) {
			logger.debug("addHeader - name=" + name + ", value=" + value);
		}

		checkCommitted();
		addHeaderInternal(name, value, false);
	}