AlphaXHeaders class final

Immutable, case-insensitive HTTP headers with multi-value support.

Constructors

AlphaXHeaders([Map<String, String> values = const <String, String>{}])
Creates headers from one value per name.
factory
AlphaXHeaders.empty()
Creates an empty header collection.
const
AlphaXHeaders.fromEntries(Iterable<MapEntry<String, String>> entries)
Creates headers from entries, retaining repeated names as multiple values.
factory

Properties

entries Iterable<MapEntry<String, String>>
Header entries with one entry for each value.
no setter
hashCode int
The hash code for this object.
no setterinherited
names Iterable<String>
Header names in normalized lowercase form.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(String name, String value) AlphaXHeaders
Returns a new collection with value appended to name.
contains(String name) bool
Whether name is present, ignoring case.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String name) AlphaXHeaders
Returns a new collection without name.
set(String name, String value) AlphaXHeaders
Returns a new collection with all values for name replaced by value.
toMap() Map<String, String>
Returns a normalized single-value map.
toString() String
A string representation of this object.
inherited
values(String name) List<String>
Returns all values for name, ignoring case.

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String name) String?
Returns repeated values joined using ordinary HTTP comma semantics.