Helper method to add a value in the internal header list.<p>

@param headers the headers to look up the value in
@param name the name to look up
@param value the value to set
494402
private void addHeaderList(Map<String, List<String>> headers, String name, String value) {

        List<String> values = headers.get(name);
        if (values == null) {
            values = new ArrayList<String>();
            headers.put(name, values);
        }
        values.add(value);
    }
343425
public void put(HttpHeader header, String value) {
        if (value == null)
            remove(header);
        else
            put(new HttpField(header, value));
    }
1366500
public T header(Header name, String value) {
		return header(name.toString(), value, true);
	}
80658
@Override
    public void addHeader(String name, String value) {
        this.checkState();
        super.addHeader(name, value);
    }
81396
public void addParamHeader(String name, String value) {
        addParam(name, value, NameValuePair.TYPE_HEADER);
    }
365206
public static void replaceHeader(Map<String, String> headers, String name, String value) {
		removeHeader(headers, name);
		headers.put(name, value);
	}
430100
protected void header(String name, String value){
        RequestContext.getHttpResponse().addHeader(name, value);
    }
972103
public HttpHubConnectionBuilder withHeader(String name, String value) {
        if (headers == null) {
            this.headers = new HashMap<>();
        }
        this.headers.put(name, value);
        return this;
    }
335191
public void addHeader(String key, String value) {
        if (key.equals("As-User")) {
            for (int i = 0; i < this.headers.size(); i++) {
                if (this.headers.get(i).getKey().equals("As-User")) {
                    this.headers.remove(i);
                }
            }
        }
        if (key.equals("X-Box-UA")) {
            throw new IllegalArgumentException("Altering the X-Box-UA header is not permitted");
        }
        this.headers.add(new RequestHeader(key, value));
    }
280590
public Request addHeader(String name, String value) {
    Objects.requireNonNull(headerMap).put(name, value);
    return this;
  }
219697
public Request setHeader(String name, String value) {
        this.headers.put(name, value);
        return this;
    }
893195
public void add(final String name, final String value) {
    ArrayList<String> values = super.get(name);
    if (values == null) {
      values = new ArrayList<String>(1);  // Often there's only 1 value.
      super.put(name, values);
    }
    values.add(value);
  }
1162893
public RequestBuilder<T,ID> addHeader(String name,String value)
    {
        headers.add(name, value);
        return this;
    }
556564
public void setHeader(String name, String value) {
		if (headers == null) {
			headers = new HashMap<String, String>();
		}
		if (value != null) {
			headers.put(name, value);
		} else {
			headers.remove(name);
		}
	}
446222
public void add(HttpHeader header, String value) {
        if (value == null)
            throw new IllegalArgumentException("null value");

        HttpField field = new HttpField(header, value);
        add(field);
    }
1170429
public final String setHeader(String name, String value) {
        sortedHeaders = null;
        return headers.put(name, value);
    }
212791
public void addHeader(String name, String value) {
        headers.add(name, value);
        List<String> list = caseSensitiveHeaders.get(name);
        if (list == null) {
            list = new ArrayList<String>();
            caseSensitiveHeaders.put(name, list);
        }
        list.add(value);
    }