curl_logger_dio_interceptor
1.0.1, released a year ago by ownweb.fr
A Dio interceptor that prints HTTP requests as cURL commands in the terminal.
What it does
It intercepts HTTP requests made through the Dio package and outputs them as copy-pasteable cURL commands in the terminal. It supports GET, POST, DELETE, and PUT requests, automatically converts FormData to plain maps, and formats request bodies correctly.
AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to debug Dio HTTP requests by replaying them as cURL commands in a terminal.
- You want to easily share HTTP requests with backend developers or import them into Postman.
Skip it when
- You are not using the Dio package for network requests.
- You require complex logging dashboards or graphical request inspection tools.
Strengths
- Generates clean cURL commands from Dio requests effortlessly.
- Handles FormData conversion automatically for file uploads.
- Uses dart:developer.log for cleaner terminal output on Android.
Weaknesses
- Limited only to Dio and cURL command logging.
- Does not provide an in-app visual UI inspector for requests.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Simply add the interceptor to your Dio instance.
_dio = Dio();
_dio.interceptors.add(CurlLoggerDioInterceptor());Alternatives
Packages that do the same job and could replace curl_logger_dio_interceptor.
- api_studio
In-app network inspector for Dio, http, and custom requests with redaction, edit & replay, and exports.
70Compare - thunder
Flutter debug overlay for real-time inspection of HTTP requests and WebSockets.
74Compare - fancy_dio_inspector
An HTTP inspector widget and interceptor for Dio to log and view requests, responses, and errors.
55Compare - dio_request_inspector
A HTTP inspector for Dio, which can intercept and log HTTP requests and responses.
50Compare
Works with
Packages commonly used together with curl_logger_dio_interceptor: ones it builds on, ones built on it, and its own family.