toMap method

Map<String, dynamic> toMap()

Converts object to map.

Implementation

Map<String, dynamic> toMap() {
  Map<String, dynamic> map = <String, dynamic>{};
  map['url'] = url;
  map['method'] = method;
  map['status'] = status;
  map['requestBody'] = requestBody;
  map['responseBody'] = responseBody;
  map['requestHeaders'] = requestHeaders;
  map['responseHeaders'] = responseHeaders;
  map['duration'] = duration;
  map['timestamp'] = date.toIsoString();

  return map;
}