Set HTTP header value or remove named header if <code>value</code> is null.

@param name HTTP header name,
@param value HTTP header value, possible null.
@since 1.9
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);
		}
	}
343425
public void put(HttpHeader header, String value) {
        if (value == null)
            remove(header);
        else
            put(new HttpField(header, value));
    }
374495
public TrailingHeaders setHeader(CharSequence name, Object value) {
        lastHttpContent.trailingHeaders().set(name, value);
        return this;
    }
972103
public HttpHubConnectionBuilder withHeader(String name, String value) {
        if (headers == null) {
            this.headers = new HashMap<>();
        }
        this.headers.put(name, value);
        return this;
    }
567910
public T header(String name, String value) {
		return header(name, value, true);
	}
357477
public void setHeader(String name, String value) 
    {
        try{_httpResponse.setField(name,value);}
        catch(IllegalStateException e){LogSupport.ignore(log,e);}
    }
801409
public static void setHeader(HttpServletResponse response, String name, Object value) {
		if (value instanceof String) {
			response.setHeader(name, (String) value);
		} else if (Date.class.isAssignableFrom(value.getClass())) {
			response.setDateHeader(name, ((Date) value).getTime());
		} else if (value instanceof Integer || "int".equals(value.getClass().getSimpleName().toLowerCase())) {
			response.setIntHeader(name, (Integer) value);
		} else {
			response.setHeader(name, value.toString());
		}
	}
1080829
public T header(String name, Object value) {
        getMessageContentBuilder().getMessageHeaders().put(name, value);
        return self;
    }
1347047
public void addHeader(String name, String value) {
        headerEntries.add(new HeaderEntry(name, value));
    }
331340
public HttpRequestBuilder addHeader(String name, String value) {
    reqHeaders.put(name, value);
    entry.withRequestHeader(name, value);
    return this;
  }
1186051
public void addHeader(String name, String value) {
	headers = ReqRspUtil.add(headers, name, value);
    }
108403
public String setField(String name, String value)
    {
        if (_state!=__MSG_EDITABLE)
            return null;

        if (HttpFields.__ContentType.equalsIgnoreCase(name))
        {
            String old=_header.get(name);
            setContentType(value);
            return old;
        }
        
        return _header.put(name,value);
    }
51590
@Override
    public void setHeader(String name, String value) {
        this._getHttpServletResponse().setHeader(name, value);
    }
1167807
public HttpFileServiceBuilder addHeader(CharSequence name, Object value) {
        requireNonNull(name, "name");
        requireNonNull(value, "value");
        getOrCreateHeaders().addObject(HttpHeaderNames.of(name), value);
        return this;
    }
1336000
public Response header(String name, String value) {
        checkCommitted();

        getHeaderMap().put(name, value);

        return this;
    }
365206
public static void replaceHeader(Map<String, String> headers, String name, String value) {
		removeHeader(headers, name);
		headers.put(name, value);
	}
1309583
@Override
	public void setDateHeader(final String name, final long value) {
		headers.put(name, String.valueOf(value));
	}