# curl_logger_dio_interceptor 1.0.1

Get your http requests printed as curl command in your terminal. Share them easily with your colleagues and import them in Postman!




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'curl_logger_dio_interceptor:1.0.1'
```
Published: 2025-11-13T06:07:08.498986Z
Expected archive SHA-256: 0702d32b8ff1b451ba1d9882d57b885061872ebc38384c18243b18b2a0db2a5b

Available in cache; verification: upstream_checksum
## Direct dependencies
- dio: ^5.1.1

## Package README (untrusted upstream documentation)
# curl_logger_dio_interceptor

[![pub package](https://img.shields.io/pub/v/curl_logger_dio_interceptor.svg)](https://pub.dartlang.org/packages/curl_logger_dio_interceptor)

A Flutter curl-command generator for Dio.

![curl_logger_dio_interceptor log output](https://github.com/OwnWeb/curl_logger_dio_interceptor/raw/main/example/assets/example.png?raw=true)

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
```dart
_dio = Dio();

_dio.interceptors.add(CurlLoggerDioInterceptor());
```

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).

## Changelog
## 1.0.1
* Fixed JSON escape for POST/PUT requests body data.

## 1.0.0

* [BREAKING] Update dio to ^5.1.1
* Fix example not building on latest android

## 0.0.3

* Add `convertFormData` param (defaults: `true`) to convert `FormData` to plain `Map` so we can get
  a CURL representation even while using `FormData` (as for file uploads).

## 0.0.2

* Use `dart:developer.log()` instead of `print` for cleaner logs (on android mostly)
* Fix `iOS` example build.

## 0.0.1

* Initial release including basic curl requests logging







 
