postman_dio 1.0.4 copy "postman_dio: ^1.0.4" to clipboard
postman_dio: ^1.0.4 copied to clipboard

Logger Interceptor for Dio with export to "Postman Collection v2.1".json

postman_dio by zfx.com #

Pub

Logger Interceptor for Dio with export to "Postman Collection v2.1".json

Import #

postman_dio: 1.0.4
copied to clipboard
import 'package:postman_dio/postman_dio.dart';
copied to clipboard

Change export collection #

      PostmanDioLogger.changeNameCollection('MyAwesomeApp ${DateTime.now().toUtc()}');
copied to clipboard

Example use #

 _dio.interceptors.add(
        PostmanDioLogger(),
      );
copied to clipboard

Example use for slow requests #

 _dio.interceptors.add(
        PostmanDioLogger(maxMilliseconds: 1000),
      );
copied to clipboard

Example use with Simple logger #

 _dio.interceptors.add(
        PostmanDioLoggerSimple(
          logPrint: (Object object) => l.log(
            object.toString(),
            name: 'PostmanDioLoggerSimple',
          ),
        ),
      );
copied to clipboard

Export #

    final exportedCollection = await PostmanDioLogger.export();
copied to clipboard

Todo: #

  • check not json body
  • add cookie
9
likes
120
points
445
downloads

Publisher

verified publisherzfx.com

Weekly Downloads

2024.08.07 - 2025.02.19

Logger Interceptor for Dio with export to "Postman Collection v2.1".json

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio, flutter

More

Packages that depend on postman_dio