HttpSink constructor

HttpSink({
  1. required String endpoint,
  2. String method = 'POST',
  3. Map<String, String> headers = const <String, String>{},
  4. LogFormatter? formatter,
  5. int batchSize = 10,
  6. Duration batchTimeout = const Duration(seconds: 30),
  7. int maxRetries = 3,
  8. Duration retryDelay = const Duration(seconds: 1),
})

Implementation

HttpSink({
  required this.endpoint,
  this.method = 'POST',
  this.headers = const <String, String>{},
  LogFormatter? formatter,
  this.batchSize = 10,
  this.batchTimeout = const Duration(seconds: 30),
  this.maxRetries = 3,
  this.retryDelay = const Duration(seconds: 1),
}) : _formatter = formatter ?? const JsonFormatter() {
  _startBatchTimer();
}