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<String, List<String>>> values)
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 name is present.
forEach(void visitor(String name, String value)) → void
Calls visitor once 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, or null.
values(String name) List<String>
Returns all values for name.
withAddedHeader(String name, String value) AcpHttpHeaders
Returns a copy with value appended under name.
withHeader(String name, String value) AcpHttpHeaders
Returns a copy with name replaced by one value.
without(String name) AcpHttpHeaders
Returns a copy without name.

Operators

operator ==(Object other) bool
The equality operator.
inherited