Adds the specified HTTP header.
511624
public B addHttpHeader(CharSequence name, Object value) {
        requireNonNull(name, "name");
        requireNonNull(value, "value");
        httpHeaders.addObject(HttpHeaderNames.of(name), value);
        return self();
    }
1374889
public void set(String name, String value) {
		HttpHeader header = get(name);
		if(header == null) {
			add(name,value);
		} else {
			header.setValue(value);
		}
	}
21207
@Override
    public void addRequestHeader(Header header) {
        LOG.trace("HttpMethodBase.addRequestHeader(Header)");

        if (header == null) {
            LOG.debug("null header value ignored");
        } else {
            getRequestHeaderGroup().addHeader(header);
        }
    }
651036
static void addHeaders(HttpUriRequest httpRequest, HttpHeaders headers) {
		for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
			String headerName = entry.getKey();
			if (HttpHeaders.COOKIE.equalsIgnoreCase(headerName)) {  // RFC 6265
				String headerValue = StringUtils.collectionToDelimitedString(entry.getValue(), "; ");
				httpRequest.addHeader(headerName, headerValue);
			}
			else if (!HTTP.CONTENT_LEN.equalsIgnoreCase(headerName) &&
					!HTTP.TRANSFER_ENCODING.equalsIgnoreCase(headerName)) {
				for (String headerValue : entry.getValue()) {
					httpRequest.addHeader(headerName, headerValue);
				}
			}
		}
	}
774452
private void addHeaders(HttpRequest request, Map<String, String> headers) {
		for (Map.Entry<String, String> key : headers.entrySet()) {
			request.addHeader(key.getKey(), key.getValue());
		}
	}
446222
public void add(HttpHeader header, String value) {
        if (value == null)
            throw new IllegalArgumentException("null value");

        HttpField field = new HttpField(header, value);
        add(field);
    }
299196
private short addTrackedHeader(final short index, final SipHeader header) {
        if (index != -1) {
            headers.set(index, header.ensure());
            return index;
        }
        return addHeader(header.ensure());
    }
849990
public HttpHeaders add(HttpHeaders headers) {
        if (headers == null) {
            throw new NullPointerException("headers");
        }
        for (Map.Entry<String, String> e: headers) {
            add(e.getKey(), e.getValue());
        }
        return this;
    }
430100
protected void header(String name, String value){
        RequestContext.getHttpResponse().addHeader(name, value);
    }
328009
function Request_addHeader(key, value) {
        var item;
        if (Type.isString(key)) {
            key = key.toLowerCase();
            if (!Type.isString(value) && !!value && Type.isFunction(value.toString)) {
                value = value.toString();
            }
            if (Type.isString(value)) {
                if (this.hasHeader(key) && !Type.isArray(this.headers[key])) {
                    item = this.getHeader(key);
                    this.headers[key] = [];
                    this.headers[key].push(item);
                    this.headers[key].push(value);
                } else if (this.hasHeader(key) && Type.isArray(this.headers[key])) {
                    this.headers[key].push(value);
                } else {
                    this.headers[key] = value;
                }
            }
        } else {
            throw new error.HttpError(500, {
                key: key,
                value: value
            }, "Request.addHeader: Header key must be string type");
        }
    }
1338471
public void addHeader(String s) throws IOException
    {
        Integer h=(Integer)__headerMap.get(s);
        if (h!=null)
            addInt(h.intValue());
        else
            addString(s);
    }
1180967
protected function addHeaders()
    {
        if (empty($this->headers)) {
            return $this;
        }

        $this->options[CURLOPT_HTTPHEADER] = $this->headers;
        return $this;
    }
216694
public void addIntHeader(String name, int value) 
    {
        try{_httpResponse.addIntField(name,value);}
        catch(IllegalStateException e){LogSupport.ignore(log,e);}
    }
456398
public void addHeader(String name, String value) 
    {
        try{_httpResponse.addField(name,value);}
        catch(IllegalStateException e){LogSupport.ignore(log,e);}
    }
566414
public HttpLogEntry withRequestHeader(String name, String value) {
    requestHeaders.add(new Header(name, value));
    return this;
  }
840992
public RequestOptions addHeader(String name, String value) {
        if (headers == null) {
            headers = new CaseInsensitiveHeaders();
        }
        headers.add(name, value);
        return this;
    }
81396
public void addParamHeader(String name, String value) {
        addParam(name, value, NameValuePair.TYPE_HEADER);
    }