logNetworkRequest abstract method

  1. @Deprecated('Use recordNetworkRequest() instead. This API will be removed ' 'in a future major version release.')
void logNetworkRequest({
  1. required String url,
  2. required HttpMethod method,
  3. required int startTime,
  4. required int endTime,
  5. required int bytesSent,
  6. required int bytesReceived,
  7. required int statusCode,
  8. String? error,
  9. String? traceId,
})

Log a network request.

Use the error parameter to pass the reason phrase or exception message for requests that are not successful.

startTime and endTime should be Unix timestamps, or the number of milliseconds since 1970-01-01T00:00:00Z (UTC), e.g. DateTime.now.millisecondsSinceEpoch.

Implementation

@Deprecated(
  'Use recordNetworkRequest() instead. This API will be removed '
  'in a future major version release.',
)
void logNetworkRequest({
  required String url,
  required HttpMethod method,
  required int startTime,
  required int endTime,
  required int bytesSent,
  required int bytesReceived,
  required int statusCode,
  String? error,
  String? traceId,
});