toMap method

Map<String, String> toMap()

Implementation

Map<String, String> toMap() {
  final result = <String, String>{};
  _headers.forEach((key, values) {
    if (values.isNotEmpty) {
      result[key] = values.join(', ');
    }
  });
  return result;
}