private RequestTemplate appendHeader(String name, Iterable<String> values) {
    if (!values.iterator().hasNext()) {
      /* empty value, clear the existing values */
      this.headers.remove(name);
      return this;
    }
    this.headers.compute(name, (headerName, headerTemplate) -> {
      if (headerTemplate == null) {
        return HeaderTemplate.create(headerName, values);
      } else {
        return HeaderTemplate.append(headerTemplate, values);
      }
    });
    return this;
  }
private RequestTemplate appendHeader ( String name , Iterable < String > values ) { if ( ! values . iterator ( ) . hasNext ( ) ) { this . headers . remove ( name ) ; return this ; } this . headers . compute ( name , ( headerName , headerTemplate ) -> { if ( headerTemplate == null ) { return HeaderTemplate . create ( headerName , values ) ; } else { return HeaderTemplate . append ( headerTemplate , values ) ; } } ) ; return this ; }
Create a Header Template.

@param name of the header
@param values for the header, may be expressions.
@return a RequestTemplate for chaining.