Headers and Trailers for HTTP requests and responses.
Names are always in lowercase.
- Available extensions
Constructors
- Headers.new()
-
Creates an empty Headers instance.
factory
- Headers.from(Headers other)
-
Creates a new Headers instance copying all the headers from
other
.factory
Properties
Methods
-
add(
String name, String value) → void -
Adds a value to the header with
name
-
addAll(
Headers other) → void -
Available on Headers, provided by the HeadersExtension extension
Copies all values fromother
-
contains(
String name) → bool -
Available on Headers, provided by the HeadersExtension extension
Whether named header is in the Headers. -
get(
String name) → Iterable< String> ? - Gets the values of a header.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String name) → void -
Removes the header matching
name
. -
set(
String name, Iterable< String> values) → void - Sets a header.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String name) → String? -
Available on Headers, provided by the HeadersExtension extension
Gets the first value of the header withname
. -
operator []=(
String name, String value) → void -
Available on Headers, provided by the HeadersExtension extension
Sets the headername
tovalue
.