containsKey method

bool containsKey(
  1. HttpHeaderName key
)

Returns true if the headers contain the key.

Implementation

bool containsKey(HttpHeaderName key) {
  return switch (this) {
    HttpHeaderMap map => map.map.containsKey(key),
    HttpHeaderRawMap rawMap =>
      rawMap.map.keys.any((e) => e.toLowerCase() == key.httpName),
    HttpHeaderList list =>
      list.list.any((e) => e.$1.toLowerCase() == key.httpName),
  };
}