diox_http2_adapter 2.1.0 copy "diox_http2_adapter: ^2.1.0" to clipboard
diox_http2_adapter: ^2.1.0 copied to clipboard

A Dio HttpClientAdapter which support Http/2.0(Support connection reuse, header compression, server pushing is not supported yet.)

example/example.dart

import 'package:diox/diox.dart';
import 'package:diox_http2_adapter/diox_http2_adapter.dart';

void main() async {
  final dio = Dio()
    ..options.baseUrl = 'https://pub.dev'
    ..interceptors.add(LogInterceptor())
    ..httpClientAdapter = Http2Adapter(
      ConnectionManager(
        idleTimeout: Duration(seconds: 10),
      ),
    );

  Response<String> response;

  response = await dio.get('/?xx=6');
  print(response.data?.length);
  print(response.redirects.length);
  print(response.data);
}
0
likes
160
pub points
25%
popularity

Publisher

verified publisherflutter.cn

A Dio HttpClientAdapter which support Http/2.0(Support connection reuse, header compression, server pushing is not supported yet.)

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

diox, http2

More

Packages that depend on diox_http2_adapter