HttpPlusClient constructor

HttpPlusClient({
  1. bool enableHttp2 = true,
  2. BaseClient? http1Client,
  3. SecurityContext? context,
  4. BadCertificateCallback? badCertificateCallback,
  5. Duration? connectionTimeout,
  6. bool autoUncompress = true,
  7. bool maintainOpenConnections = true,
  8. int maxOpenConnections = -1,
  9. bool enableLogging = false,
})

Create HttpPlusClient object.

Implementation

HttpPlusClient({
  this.enableHttp2 = true,
  BaseClient? http1Client,
  this.context,
  this.badCertificateCallback,
  this.connectionTimeout,
  this.autoUncompress = true,
  this.maintainOpenConnections = true,
  this.maxOpenConnections = -1,
  this.enableLogging = false,
})  : assert(maxOpenConnections == -1 || maxOpenConnections > 0,
          'maxOpenConnections must be -1, or > 0.'),
      http1Client = http1Client ??
          IOClient(HttpClient(context: context)
            ..badCertificateCallback = badCertificateCallback
            ..connectionTimeout = connectionTimeout
            ..autoUncompress = autoUncompress);