| Index: lib/src/util.dart
|
| diff --git a/lib/src/util.dart b/lib/src/util.dart
|
| index 270ea6b86ffc0cab909dd24b5cb74a60928a42b1..4154e8e0e741651648fa681a451248edeb6ed293 100644
|
| --- a/lib/src/util.dart
|
| +++ b/lib/src/util.dart
|
| @@ -40,3 +40,13 @@ Map updateMap(Map original, Map updates) {
|
|
|
| return new Map.from(original)..addAll(updates);
|
| }
|
| +
|
| +/// Adds a header with [name] and [value] to [headers], which may be null.
|
| +///
|
| +/// Returns a new map without modifying [headers].
|
| +Map<String, String> addHeader(
|
| + Map<String, String> headers, String name, String value) {
|
| + headers = headers == null ? {} : new Map.from(headers);
|
| + headers[name] = value;
|
| + return headers;
|
| +}
|
|
|