dio_interceptor_plus 0.0.2 copy "dio_interceptor_plus: ^0.0.2" to clipboard
dio_interceptor_plus: ^0.0.2 copied to clipboard

Effortlessly enhance API handling in Flutter with detailed logging for requests, responses, and errors using Dio HTTP client integration.

example/lib/main.dart

import 'package:dio/dio.dart';
import 'package:dio_interceptor_plus/dio_interceptor_plus.dart';
import 'package:flutter/cupertino.dart';

void main() async {
  // Create Dio instance
  final dio = Dio();

  // Add logging interceptor for request and response
  dio.interceptors.add(LoggingInterceptor());

  // Example HTTP Request
  try {
    await dio.get('https://jsonplaceholder.typicode.com/posts/1');
  } catch (e) {
    // Handle errors
    debugPrint('Error: $e');
  }
}
13
likes
160
points
48
downloads

Publisher

verified publisheritpathsolutions.com

Weekly Downloads

Effortlessly enhance API handling in Flutter with detailed logging for requests, responses, and errors using Dio HTTP client integration.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio, flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on dio_interceptor_plus