getLogContent method
void
getLogContent({
- required String logId,
- required dynamic onOk(),
- required VoidCallback onError,
- dynamic onException()?,
Implementation
void getLogContent({
required final String logId,
required final Function(List<LogContentResponse> r) onOk,
required final VoidCallback onError,
final Function(Exception)? onException,
}) =>
httpClient.post(
"/api/logs/content",
body: <String, String>{"id": logId},
onSuccess: (final String r) => onOk(json.decode(r).map((dynamic e) => LogContentResponse.fromMap(e)).toList()),
onError: (final String r) => onError(),
onException: (dynamic e) {
if (onException != null) onException(e);
},
);