dio_http2_adapter library

Classes

ClientSetting
ConnectionManager
Manages the connections that should be reusable. It implements a connection reuse strategy for HTTP/2.
Http2Adapter
A Dio HttpAdapter which implements Http/2.0.

Functions

defaultProxyConnectedPredicate(String protocol, String status) bool
Accepts HTTP/1.x connections for proxies.

Typedefs

H2NotSupportedCallback = Future<ResponseBody> Function(RequestOptions options, Stream<Uint8List>? requestStream, Future<void>? cancelFuture, DioH2NotSupportedException exception)
The signature of Http2Adapter.onNotSupported.
ProxyConnectedPredicate = bool Function(String protocol, String status)
Checks whether the proxy has been connected through the given status.
ValidateCertificate = bool Function(X509Certificate? certificate, String host, int port)

Exceptions / Errors

DioH2NotSupportedException
The exception when a connected socket for the uri does not support HTTP/2.