public String expand(Map<String, ?> variables) {
    List<String> expanded = new ArrayList<>();
    if (!this.values.isEmpty()) {
      for (Template template : this.values) {
        String result = template.expand(variables);

        if (result == null) {
          /* ignore unresolved values */
          continue;
        }

        expanded.add(result);
      }
    }

    StringBuilder result = new StringBuilder();
    if (!expanded.isEmpty()) {
      result.append(String.join(", ", expanded));
    }

    return result.toString();
  }
Create a new Header Template.

@param name of the header
@param values of the header
@param charset for the header
@param literal indicator. Will treat all values as literals instead of possible expressions.
core/src/main/java/feign/template/HeaderTemplate.java