postman_dio 0.9.4 postman_dio: ^0.9.4 copied to clipboard
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: 0.9.4
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