dio_brotli_transformer 2.0.0 copy "dio_brotli_transformer: ^2.0.0" to clipboard
dio_brotli_transformer: ^2.0.0 copied to clipboard

Brotli support for Dio http client

example/lib/example.dart

import 'package:dio/dio.dart';
import 'package:dio_brotli_transformer/dio_brotli_transformer.dart';

Future<void> main() async {
  final dio = Dio(
    BaseOptions(
      headers: {
        'accept-encoding': 'br',
      },
    ),
  );

  dio.transformer = DioBrotliTransformer();

  final response = await dio.get('https://httpbin.org/brotli');
  print(response.data);
}
3
likes
150
pub points
88%
popularity

Publisher

verified publishervycius.lt

Brotli support for Dio http client

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

brotli, dio

More

Packages that depend on dio_brotli_transformer