Headers class

Constructors

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

Properties

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

Methods

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.
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited

Operators

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.
operator ==(dynamic other) → bool
The equality operator.
inherited

Static Properties

jsonMimeType MediaType
final

Constants

acceptHeader → const String
'accept'
contentEncodingHeader → const String
'content-encoding'
contentLengthHeader → const String
'content-length'
contentTypeHeader → const String
'content-type'
formUrlEncodedContentType → const String
'application/x-www-form-urlencoded'
jsonContentType → const String
'application/json; charset=utf-8'
wwwAuthenticateHeader → const String
'www-authenticate'