AcpHttpHeaders class final
Immutable, case-insensitive HTTP headers with preserved repeated values.
Constructors
- AcpHttpHeaders()
-
Creates empty headers.
const
-
AcpHttpHeaders.fromMap(Map<
String, String> values) -
Creates headers from single-value entries.
factory
-
AcpHttpHeaders.fromValues(Iterable<
MapEntry< values)String, List< >String> > -
Creates headers from repeated-value entries.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Whether no headers are present.
no setter
- redactedSummary → String
-
Returns a redacted diagnostic view containing header names only.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
contains(
String name) → bool -
Whether
nameis present. -
forEach(
void visitor(String name, String value)) → void -
Calls
visitoronce for every individual header value. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
overlay(
AcpHttpHeaders other) → AcpHttpHeaders -
Overlays every header in
other, replacing matching names. -
toString(
) → String -
A string representation of this object.
override
-
value(
String name) → String? -
Returns the comma-joined value for
name, ornull. -
values(
String name) → List< String> -
Returns all values for
name. -
withAddedHeader(
String name, String value) → AcpHttpHeaders -
Returns a copy with
valueappended undername. -
withHeader(
String name, String value) → AcpHttpHeaders -
Returns a copy with
namereplaced by onevalue. -
without(
String name) → AcpHttpHeaders -
Returns a copy without
name.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited