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

outdated

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.1
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
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter

More

Packages that depend on postman_dio