toJson method

Map<String, Object> toJson()

Converts a HTTPHeader instance to JSON data.

Implementation

Map<String, Object> toJson() {
  final jsonData = <String, Object>{};

  final tempName = name;
  final tempValue = value;

  jsonData['name'] = tempName;

  jsonData['value'] = tempValue;

  return jsonData;
}