dio_debugger 0.1.5 copy "dio_debugger: ^0.1.5" to clipboard
dio_debugger: ^0.1.5 copied to clipboard

Lightweight utility to attach a reverse/forward proxy to an existing Dio instance for local debugging.

example/main.dart

import 'package:dio/dio.dart';
import 'package:dio_debugger/dio_debugger.dart';

Future<void> main() async {
  final dio = Dio(
    BaseOptions(baseUrl: 'https://api.example.com'),
  );

  // Attach reverse proxy interceptor for local debugging
  // Set resetCaptureOnHotRestart: true to automatically clear previous sessions
  // and start a new capture on each hot restart
  DioDebugger.attach(
    dio,
    resetCaptureOnHotRestart: true,
  );

  final response = await dio.get('/health');
  print('Status: \'${response.statusCode}\'');
}
2
likes
150
points
197
downloads

Publisher

unverified uploader

Weekly Downloads

Lightweight utility to attach a reverse/forward proxy to an existing Dio instance for local debugging.

Repository (GitHub)
View/report issues
Contributing

Topics

#dio #http #debug #proxy #reverse

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

dio

More

Packages that depend on dio_debugger