addHeader method

void addHeader(
  1. String name,
  2. dynamic value
)

Insert a header of the given name and value into the last position of the header array.

Implementation

void addHeader(String name, dynamic value) {
  Map<String, dynamic> header = <String, dynamic>{'raw': value};

  name = utils.headerize(name);

  if (headers![name] != null) {
    headers![name].add(header);
  } else {
    headers![name] = <dynamic>[header];
  }
}