logResponse method
void
logResponse({})
Update an existing entry with response data
Implementation
void logResponse({
required String id,
required int statusCode,
Map<String, dynamic>? headers,
dynamic body,
required Duration duration,
}) {
final index = _entries.indexWhere((e) => e.id == id);
if (index != -1) {
_entries[index] = _entries[index].copyWith(
statusCode: statusCode,
responseHeaders: headers,
responseBody: body,
duration: duration,
isCompleted: true,
);
_notifyListeners();
}
}