private RequestTemplate appendHeader(String name, Iterable<String> values, boolean literal) {
    if (!values.iterator().hasNext()) {
      /* empty value, clear the existing values */
      this.headers.remove(name);
      return this;
    }
    if (name.equals("Content-Type")) {
      // a client can only produce content of one single type, so always override Content-Type and
      // only add a single type
      this.headers.remove(name);
      this.headers.put(
          name, HeaderTemplate.create(name, Collections.singletonList(values.iterator().next())));
      return this;
    }
    this.headers.compute(
        name,
        (headerName, headerTemplate) -> {
          if (headerTemplate == null) {
            if (literal) {
              return HeaderTemplate.literal(headerName, values);
            } else {
              return HeaderTemplate.create(headerName, values);
            }
          } else if (literal) {
            return HeaderTemplate.appendLiteral(headerTemplate, values);
          } else {
            return HeaderTemplate.append(headerTemplate, values);
          }
        });
    return this;
  }
Append the Header. Will create a new Header if it doesn't already exist.

@param name of the header
@param values for the header, may be expressions.
@param literal indicator, to treat the values as literals and not expressions
@return a RequestTemplate for chaining.
core/src/main/java/feign/RequestTemplate.java