HttpPlusClient constructor
HttpPlusClient({
- bool enableHttp2 = true,
- BaseClient? http1Client,
- SecurityContext? context,
- BadCertificateCallback? badCertificateCallback,
- Duration? connectionTimeout,
- bool autoUncompress = true,
- bool maintainOpenConnections = true,
- int maxOpenConnections = -1,
- 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);