设置请求头<br>
当请求头存在时，覆盖之

@param header 头名
@param value 头值
@param isOverride 是否覆盖旧值
@return HttpConnection
507565
public HttpConnection header(String header, String value, boolean isOverride) {
		if (null != this.conn) {
			if (isOverride) {
				this.conn.setRequestProperty(header, value);
			} else {
				this.conn.addRequestProperty(header, value);
			}
		}

		return this;
	}
1070726
public Response header(String name, Date value) {
        checkCommitted();

        getHeaderMap().put(name, DateUtils.formatForHttpHeader(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);
      }
    }
  }
184406
public B setHttpHeader(CharSequence name, Object value) {
        requireNonNull(name, "name");
        requireNonNull(value, "value");
        httpHeaders.setObject(HttpHeaderNames.of(name), value);
        return self();
    }
219697
public Request setHeader(String name, String value) {
        this.headers.put(name, value);
        return this;
    }
503279
public HttpClient setHeader(String name, Object value) {
        if (mHeaders == null) {
            mHeaders = new HttpHeaderMap();
        }
        mHeaders.put(name, value);
        return this;
    }
300344
public void setHeader(String key, Object value) {
        this.httpMessage.headers().set(key, value);
    }
1163207
private void copyHeadersToClient(HttpURLConnection pRemoteConnection, HttpServletResponse pResponse) {
        // NOTE: There is no getHeaderFieldCount method or similar...
        // Also, the getHeaderFields() method was introduced in J2SE 1.4, and
        // we want to be 1.2 compatible.
        // So, just try to loop until there are no more headers.
        int i = 0;
        while (true) {
            String key = pRemoteConnection.getHeaderFieldKey(i);
            // NOTE: getHeaderField(String) returns only the last value
            String value = pRemoteConnection.getHeaderField(i);

            // If the key is not null, life is simple, and Sun is shining
            // However, the default implementations includes the HTTP response
            // code ("HTTP/1.1 200 Ok" or similar) as a header field with
            // key "null" (why..?)...
            // In addition, we want to skip the original "Server" header
            if (key != null && !HTTP_RESPONSE_HEADER_SERVER.equalsIgnoreCase(key)) {
                //System.out.println("client <<<-- remote: " + key + ": " + value);
                pResponse.setHeader(key, value);
            }
            else if (value == null) {
                // If BOTH key and value is null, there are no more header fields
                break;
            }

            i++;
        }

        /* 1.4+ version below....
        Map headers = pRemoteConnection.getHeaderFields();
        for (Iterator iterator = headers.entrySet().iterator(); iterator.hasNext();) {
            Map.Entry header = (Map.Entry) iterator.next();

            List values = (List) header.getValue();

            for (Iterator valueIter = values.iterator(); valueIter.hasNext();) {
                String value = (String) valueIter.next();
                String key = (String) header.getKey();

                // Skip the server header
                if (HTTP_RESPONSE_HEADER_SERVER.equalsIgnoreCase(key)) {
                    key = null;
                }

                // The default implementations includes the HTTP response code
                // ("HTTP/1.1 200 Ok" or similar) as a header field with
                // key "null" (why..?)...
                if (key != null) {
                    //System.out.println("client <<<-- remote: " + key + ": " + value);
                    pResponse.setHeader(key, value);
                }
            }
        }
        */
    }
374495
public TrailingHeaders setHeader(CharSequence name, Object value) {
        lastHttpContent.trailingHeaders().set(name, value);
        return this;
    }
797136
public MarketplaceWebServiceOrdersConfig withRequestHeader(String name, String value) {
        cc.includeRequestHeader(name, value);
        return this;
    }
470293
public static HttpConnection connect(String requestMethod,
                                         URL url,
                                         String contentType) {
        return new HttpConnection(requestMethod, url, contentType);
    }
536029
public static ClientAddressSource ofHeader(CharSequence header) {
        checkArgument(header != null && header.length() > 0, "empty header");
        return new ClientAddressSource(HttpHeaderNames.of(header));
    }
253088
public void addHeader(String name, String value) {
        httpRequest.headers().add(name, value);
    }
396651
public static Header of(String name, String value) {
        return new Header(requireNonNull(name), requireNonNull(value));
    }
579815
private void copyHeadersFromClient(HttpServletRequest pRequest, HttpURLConnection pRemoteConnection) {
        Enumeration headerNames = pRequest.getHeaderNames();
        while (headerNames.hasMoreElements()) {
            String headerName = (String) headerNames.nextElement();
            Enumeration headerValues = pRequest.getHeaders(headerName);

            // Skip the "host" header, as we want something else
            if (HTTP_REQUEST_HEADER_HOST.equalsIgnoreCase(headerName)) {
                // Skip this header
                headerName = null;
            }

            // Set the the header to the remoteConnection
            if (headerName != null) {
                // Convert from multiple line to single line, comma separated, as
                // there seems to be a shortcoming in the URLConneciton API...
                StringBuilder headerValue = new StringBuilder();
                while (headerValues.hasMoreElements()) {
                    String value = (String) headerValues.nextElement();
                    headerValue.append(value);
                    if (headerValues.hasMoreElements()) {
                        headerValue.append(", ");
                    }
                }

                //System.out.println("client -->>> remote: " + headerName + ": " + headerValue);
                pRemoteConnection.setRequestProperty(headerName, headerValue.toString());
            }
        }
    }
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);
		}
	}
567910
public T header(String name, String value) {
		return header(name, value, true);
	}