dio_intercept_to_curl 0.2.0 copy "dio_intercept_to_curl: ^0.2.0" to clipboard
dio_intercept_to_curl: ^0.2.0 copied to clipboard

Intercept Dio requests and print them as curl commands in the debug panel. Easily paste the request in your terminal to run it again. Use it to easily debug your Dio request.

dio_intercept_to_curl #

pub package

A Flutter curl-command generator for Dio.

dio_intercept_to_curl log output

Easily test your Flutter-made requests in your favorite terminal or even in Postman or Insomnia.

Why? #

Sometimes you want to replay the HTTP requests made in your app, or you want to share it with your beloved backend developer. Or you just love CURL.

Use your app as you want, and when the broken-request comes, look at your terminal, copy and paste it, and enjoy replaying it easily!

Features #

  • Simple GET/POST/DELETE/PUT requests logging
  • With data when available
  • Postman-ready

Getting Started #

_dio = Dio();

_dio.interceptors.add(DioInterceptToCurl());

Depending on your needs, you can also pass printOnSuccess: true to print all requests instead of only errored ones.

By default, convertFormData is true and converts FormData to plain Map so we can get a CURL representation even while using FormData (as for file uploads).

8
likes
160
pub points
89%
popularity

Publisher

verified publisherblackflamedigital.com

Intercept Dio requests and print them as curl commands in the debug panel. Easily paste the request in your terminal to run it again. Use it to easily debug your Dio request.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio, flutter

More

Packages that depend on dio_intercept_to_curl