httpResponse method

void httpResponse({
  1. required String source,
  2. required String operation,
  3. String? target,
  4. Duration? duration,
  5. String? correlationId,
  6. Map<String, Object?>? meta,
  7. ISpectTraceConfig? config,
  8. String? consoleMessage,
})

Logs an HTTP response (2xx/3xx) under networkCategory.

Implementation

void httpResponse({
  required String source,
  required String operation,
  String? target,
  Duration? duration,
  String? correlationId,
  Map<String, Object?>? meta,
  ISpectTraceConfig? config,
  String? consoleMessage,
}) =>
    traceCategory(
      category: networkCategory,
      source: source,
      operation: operation,
      target: target,
      logKey: ISpectLogType.httpResponse.key,
      success: true,
      duration: duration,
      correlationId: correlationId,
      config: config,
      meta: meta,
      consoleMessage: consoleMessage,
    );