Skip to content
pubscout

dio_intercept_to_curl

0.2.0, released 3 years ago by blackflamedigital.com

Intercepts Dio requests and prints them as curl commands in the debug panel.

WASM-ready
$ flutter pub add dio_intercept_to_curl
Source repository

What it does

It intercepts Dio HTTP requests and generates equivalent cURL commands in the debug output. This allows developers to easily copy and paste requests into a terminal, Postman, or Insomnia for replaying and debugging.

AI-written summary of version 0.2.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to quickly debug and replay Dio HTTP requests in a terminal or Postman
  • You want to share exact cURL representations of app requests with backend developers

Skip it when

  • You need a comprehensive network inspector UI rather than terminal text logs

Strengths

  • Simple to set up with Dio interceptors
  • Supports FormData conversion to plain maps for file uploads
  • Postman and Insomnia ready

Weaknesses

  • Only prints to the debug panel/terminal
  • Limited to request logging and cURL generation

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Just add the interceptor to your Dio instance.

_dio = Dio();

_dio.interceptors.add(DioInterceptToCurl());

Alternatives

Packages that do the same job and could replace dio_intercept_to_curl.

  • pretty_dio_logger

    Provides a pretty printer for Dio request, response, and error logs if you prefer a detailed formatted log output instead of cURL commands.

Works with

Packages commonly used together with dio_intercept_to_curl: ones it builds on, ones built on it, and its own family.