add method

void add(
  1. String key,
  2. List<String> value
)

Adds a header with the given name and values. Appends to the existing values if the header already exists.

Implementation

void add(String key, List<String> value) {
  if (_headers[key] == null) {
    _headers[key] = value;
  } else {
    _headers[key]?.addAll(value);
  }
}