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

outdated

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

postman_dio by zfx.com #

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

Import #

postman_dio:
  git:
    url: https://github.com/zfx-com/postman_dio
    ref: v.0.9.3
import 'package:postman_dio/postman_dio.dart';

Change export collection #

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

Example use #

 _dio.interceptors.add(
        PostmanDioLogger(),
      );

Example use for slow requests #

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

Example use with Simple logger #

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

Export #

    final exportedCollection = await PostmanDioLogger.export();

Todo: #

  • check not json body
  • add cookie
9
likes
0
pub points
37%
popularity

Publisher

verified publisherzfx.com

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

Homepage

License

unknown (license)

Dependencies

dio, flutter

More

Packages that depend on postman_dio