Headers class
The headers class for requests and responses.
Constructors
Properties
- hashCode → int
- 
  The hash code for this object.
  no setterinherited
- isEmpty → bool
- 
  Whether the headers has no fields.
  no setter
- 
  map
  → Map<String, List< String> >
- 
  
  no setter
- preserveHeaderCase → bool
- 
  Whether the header key should be case-sensitive.
  final
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
Methods
- 
  add(String name, String value) → void 
- 
  Adds a header value. The header named namewill have the valuevalueadded to its list of values.
- 
  clear() → void 
- Clearing all fields in the headers.
- 
  forEach(HeaderForEachCallback f) → void 
- 
  Enumerates the headers, applying the function fto each header. The header name passed innamewill be all lower case.
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  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 namewill have all its values cleared before the valuevalueis added as its value.
- 
  toString() → String 
- 
  A string representation of this object.
  override
- 
  value(String name) → String? 
- 
  Convenience method for the value for a single valued header. If
there is no header with the provided name, nullwill be returned. If the header has more than one value an exception is thrown.
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited
- 
  operator [](String name) → List< String> ?
- 
  Returns the list of values for the header named name. If there is no header with the provided name,nullwill be returned.
Static Properties
- jsonMimeType → MediaType
- 
  
  final
Constants
- acceptHeader → const String
- contentEncodingHeader → const String
- contentLengthHeader → const String
- contentTypeHeader → const String
- formUrlEncodedContentType → const String
- jsonContentType → const String
- multipartFormDataContentType → const String
- textPlainContentType → const String
- wwwAuthenticateHeader → const String