pretty_diox_logger 1.3.4 pretty_diox_logger: ^1.3.4 copied to clipboard
Pretty Diox logger is a Diox interceptor that logs network calls in a pretty, easy to read format.
import 'package:dio/dio.dart';
import 'package:pretty_diox_logger/pretty_diox_logger.dart';
void main() async {
final dio = Dio()
..interceptors.add(PrettyDioLogger(
requestHeader: true,
requestBody: true,
responseBody: true,
responseHeader: false,
compact: false,
));
try {
await dio.get('http://www.mocky.io/v2/5d7fc75c3300000476f0b557');
} catch (e) {
print(e);
}
}