Logger Interceptor for Dio with export to "Postman Collection v2.1".json
postman_dio: 1.0.4
import 'package:postman_dio/postman_dio.dart';
PostmanDioLogger.changeNameCollection('MyAwesomeApp ${DateTime.now().toUtc()}');
_dio.interceptors.add(
PostmanDioLogger(),
);
_dio.interceptors.add(
PostmanDioLogger(maxMilliseconds: 1000),
);
_dio.interceptors.add(
PostmanDioLoggerSimple(
logPrint: (Object object) => l.log(
object.toString(),
name: 'PostmanDioLoggerSimple',
),
),
);
final exportedCollection = await PostmanDioLogger.export();
- check not json body
- add cookie