DefaultHttp2Adapter constructor
DefaultHttp2Adapter({
- Duration idleTimeout = const Duration(seconds: 15),
- SecurityContext? context,
- Uri? proxy,
- bool onBadCertificate()?,
- ValidateCertificate? validateCertificate,
Implementation
DefaultHttp2Adapter({
Duration idleTimeout = const Duration(seconds: 15),
/// context is the security context for new secure socket connections.
SecurityContext? context,
/// proxy is the callback to return a proxy url for request.
Uri? proxy,
/// onBadCertificate is the callback for handling bad certificates.
bool Function(X509Certificate)? onBadCertificate,
/// validateCertificate is the callback to validate the certificate
http2.ValidateCertificate? validateCertificate,
}) : super(
http2.ConnectionManager(
idleTimeout: idleTimeout,
onClientCreate: (uri, clientSettings) {
clientSettings
/// context is the security context for new secure socket connections.
..context = context
/// proxy is the callback to return a proxy url for request.
..proxy = proxy
/// onBadCertificate is the callback for handling bad certificates.
..onBadCertificate = onBadCertificate
/// validateCertificate is the callback to validate the certificate
..validateCertificate = validateCertificate;
},
),
);