HttpHeaderMap class

A typed header map with a set of predefined keys.

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
map Map<HttpHeaderName, String>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

containsKey(HttpHeaderName key) bool
Returns true if the headers contain the key.
inherited
copyWith({required HttpHeaderName name, required String value}) HttpHeaders
Adds a header to the headers. Returns a new instance of HttpHeaders with the added header.
inherited
copyWithout(HttpHeaderName key) HttpHeaders
Removes a header from the headers. Returns a new instance of HttpHeaders without the key.
inherited
copyWithoutRaw(String key) HttpHeaders
Removes a header from the headers. Returns a new instance of HttpHeaders without the key. Converts HttpHeaderMap to HttpHeaderRawMap.
inherited
copyWithRaw({required String name, required String value}) HttpHeaders
Adds a header to the headers. Returns a new instance of HttpHeaders with the added header. Converts HttpHeaderMap to HttpHeaderRawMap.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMapList() Map<String, List<String>>
Converts the headers to a map where duplicate headers are represented using a list of values.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](HttpHeaderName key) String?
Returns the value of the header with the key. Returns null if the header is not found.
inherited