value method

String? value(
  1. String name
)

Returns header value by name

If there is no header with the provided name, null will be returned. If the header has more than one value, first value will be returned.

Implementation

String? value(String name) {
  name = name.toLowerCase();
  List<String>? values = headers[name];
  if (values == null) return null;
  return values[0];
}