/** * Sets the (only) value for the header with the specified name. * <p/> * All existing values for the same header will be removed. * * @param name The name of the header * @param values The value of the header * @return this builder */ public Builder set(CharSequence name, Iterable values) { nonNullValues(values) .ifPresent(nonNullValues -> this.nettyHeaders.set(name, nonNullValues)); return this; }
/** * Adds a new header with the specified {@code name} and {@code values}. * <p/> * Will not replace any existing values for the header. * * @param name The name of the header * @param values The value of the header * @return this builder */ public Builder add(CharSequence name, Iterable values) { nonNullValues(values) .ifPresent(nonNullValues -> this.nettyHeaders.add(name, nonNullValues)); return this; }
/** * Sets the (only) value for the header with the specified name. * <p/> * All existing values for the same header will be removed. * * @param name The name of the header * @param values The value of the header * @return this builder */ public Builder set(CharSequence name, Iterable values) { nonNullValues(values) .ifPresent(nonNullValues -> this.nettyHeaders.set(name, nonNullValues)); return this; }
/** * Adds a new header with the specified {@code name} and {@code values}. * <p/> * Will not replace any existing values for the header. * * @param name The name of the header * @param values The value of the header * @return this builder */ public Builder add(CharSequence name, Iterable values) { nonNullValues(values) .ifPresent(nonNullValues -> this.nettyHeaders.add(name, nonNullValues)); return this; }