toMap method
Implementation
@override
Map<String, dynamic> toMap() {
final data = {
'targetUrl': targetUrl,
'method': method,
'contentType': contentType,
'rqb': rqb,
'rqh': _processHeaders(rqh),
'requestTimestamp': requestTimestamp,
'responseTimestamp': responseTimestamp,
'responseStatusText': responseStatusText,
'rsb': rsb,
'responseStatusCode': responseStatusCode,
'rsh': _processHeaders(rsh),
'requestSize': _getContentLengthFor(rqh),
'responseSize': _getContentLengthFor(rsh),
'duration': responseTimestamp - requestTimestamp,
};
data.removeWhere(
(key, value) => (value == null || value == "" || value == "null"));
return data;
}