dio_debugger 0.1.1 copy "dio_debugger: ^0.1.1" to clipboard
dio_debugger: ^0.1.1 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/forward proxy interceptor for local debugging
  DioDebugger.attach(
    dio,
    upstreamBaseUrl: 'https://api.example.com',
    proxyBaseUrl: 'http://localhost:9091',
    proxyHttpPath: '/httpproxy',
  );

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

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

Topics

#dio #http #debug #proxy #reverse

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

dio

More

Packages that depend on dio_debugger