Headers class

HTTP Headers Headers object is mutable and values can be added up until Client.send is called.

Constructors

Headers([Map<String, dynamic>? values])
Creates a HTTP Header object, optinally using values as initializer.

Properties

hashCode int
The hash code for this object.
no setterinherited
keys Iterable<String>
Returns the header names set.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(String header, dynamic value) → void
Add header with value.
clone() Headers
Creates a header object with the copy if the current one's content.
containsKey(String key) bool
Whether the key is specified.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String header) → void
Remove header.
toMap() Map<String, List<String>>
Gets a deep copy of the values.
toSimpleMap() Map<String, String>
Converts values to a simple String -> String Map. When multiple header values are present, only the last value is is used.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String header) List<String>?
Returns the values set for header.