dio_curl_logger 1.1.0 copy "dio_curl_logger: ^1.1.0" to clipboard
dio_curl_logger: ^1.1.0 copied to clipboard

A Flutter package for logging Dio HTTP requests as curl commands and responses, enabling easier debugging and analysis of network interactions.

example/main.dart

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

void main() async {
  final dio = Dio();

  // Add the CurlLoggingInterceptor
  dio.interceptors.add(
    CurlLoggingInterceptor(
      showRequestLog: true,
      showResponseLog: true,
    ),
  );

  // Make a sample HTTP request
  final response = await dio.get('https://example.com/resource');
}
3
likes
160
points
34
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for logging Dio HTTP requests as curl commands and responses, enabling easier debugging and analysis of network interactions.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio, flutter

More

Packages that depend on dio_curl_logger