Set a request header, replacing any existing value.
A null for {@code value} will remove the header if one with matching name exists.

@param name the header name
@param value the header value
@return this HttpRequest
761128
public HttpRequest withHeader(String name, String value) {
        headers.set(name, value);
        return this;
    }
898252
public String value(String name) {
        final HttpHeader header = getHeader(name);
        return header == null ? null : header.value();
    }
468730
public HttpResponse withHeader(String name, String... values) {
        this.headers.withEntry(name, values);
        return this;
    }
964743
public GenericResponseBuilder<T> header(String name, Object value) {
    rawBuilder.header(name, value);
    return this;
  }
684914
public void setHeader(String name, Object value) {
    verifyType(name, value);
    if (value != null) {
      // Modify header if necessary
      if (!ObjectUtils.nullSafeEquals(value, getHeader(name))) {
        this.modified = true;
        this.headers.put(name, value);
      }
    } else {
      // Remove header if available
      if (this.headers.containsKey(name)) {
        this.modified = true;
        this.headers.remove(name);
      }
    }
  }
1217330
public function header($name, $value = null)
    {

        if ($value === null) {
            $this->headers[] = $name;
        } else {
            $this->headers[] = $this->headerString($name, $value);
        }

        return $this;
    }
566414
public HttpLogEntry withRequestHeader(String name, String value) {
    requestHeaders.add(new Header(name, value));
    return this;
  }
1280842
public void setIntHeader(String name, int value) 
    {
        try{_httpResponse.setIntField(name,value);}
        catch(IllegalStateException e){LogSupport.ignore(log,e);}
    }
1364596
public final B setHeader(CharSequence name, Object value) {
        requireNonNull(name, "name");
        requireNonNull(value, "value");
        getOrCreateHeaders().setObject(HttpHeaderNames.of(name), value);
        return self();
    }
335077
public void setHeader(String name, String value) {
	headers = ReqRspUtil.set(headers, name, value);
    }
529534
public DatabaseConnectionRequest<T, U> addHeader(String name, String value) {
        request.addHeader(name, value);
        return this;
    }
1030226
public TrailingHeaders addHeader(CharSequence name, Object value) {
        lastHttpContent.trailingHeaders().add(name, value);
        return this;
    }
782504
public RestRequest<T> addHeader(String name, String value) {
        headers.put(name, value);
        return this;
    }
172412
public T header(String name, String value) {
        Collection<String> l = headers.get(name);
        if (l == null) {
            l = new ArrayList<String>();
        }
        l.add(value);
        headers.put(name, l);
        return derived.cast(this);
    }
926552
@Override
    public void addHeader(String name, String value) {
        this._getHttpServletResponse().addHeader(name, value);
    }
253088
public void addHeader(String name, String value) {
        httpRequest.headers().add(name, value);
    }
840300
public Request setParam(String name, String value) {
        this.params.put(name, value);
        return this;
    }