toJson method
Serialize to JSON map.
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'method': method,
'url': url,
'headers': headers,
'body': body,
'cacheKey': cacheKey,
'maxRetries': maxRetries,
'enqueuedAt': (enqueuedAt ?? DateTime.now()).toIso8601String(),
};