LogCurlConfig constructor

LogCurlConfig({
  1. bool defaultShowDebugPrint = true,
  2. bool defaultMaskSensitiveInfo = false,
  3. bool defaultFormatOutput = false,
  4. CurlOptions? defaultCurlOptions,
  5. List<String>? sensitiveHeaders,
  6. void loggerFunction(
    1. String message
    )?,
})

Creates a configuration instance with default values.

Default configuration:

  • sensitiveHeaders: Pre-defined list of common sensitive header names

Implementation

LogCurlConfig({
  this.defaultShowDebugPrint = true,
  this.defaultMaskSensitiveInfo = false,
  this.defaultFormatOutput = false,
  this.defaultCurlOptions,
  List<String>? sensitiveHeaders,
  this.loggerFunction,
}) : sensitiveHeaders = sensitiveHeaders ??
          [
            'authorization',
            'api-key',
            'apikey',
            'x-api-key',
            'token',
            'secret',
            'password',
            'access-token',
            'refresh-token',
            'session-token',
          ];