Headers class


Headers.fromMap(Map<String, List<String>> map)


hashCode int
The hash code for this object. [...]
read-only, inherited
map Map<String, List<String>>
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


add(String name, String value) → void
Adds a header value. The header named name will have the value value added to its list of values.
clear() → void
forEach(HeaderForEachCallback f) → void
Enumerates the headers, applying the function f to each header. The header name passed in name will be all lower case.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
remove(String name, String value) → void
Removes a specific value for a header name.
removeAll(String name) → void
Removes all values for the specified header name.
set(String name, dynamic value) → void
Sets a header. The header named name will have all its values cleared before the value value is added as its value.
toString() String
Returns a string representation of this object.
value(String name) String
Convenience method for the value for a single valued header. If there is no header with the provided name, null will be returned. If the header has more than one value an exception is thrown.


operator ==(Object other) bool
The equality operator. [...]
operator [](String name) List<String>
Returns the list of values for the header named name. If there is no header with the provided name, null will be returned.

Static Properties

jsonMimeType MediaType


acceptHeader → const String
contentEncodingHeader → const String
contentLengthHeader → const String
contentTypeHeader → const String
formUrlEncodedContentType → const String
jsonContentType → const String
'application/json; charset=utf-8'
wwwAuthenticateHeader → const String