Skip to content
pubscout

dio_http_formatter

3.3.1, released a year ago by an unverified publisher

Dio interceptor that pretty‑prints HTTP requests and responses to the console.

$ flutter pub add dio_http_formatter
Source repository

What it does

Adds an interceptor to a Dio client that logs request and response details in a readable format using the Logger package. Supports JSON, form‑urlencoded, HTML, and multipart bodies and allows filtering of logged entries.

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

Use it when

  • You need detailed console logs for debugging Dio network calls
  • You want configurable logging of request/response data without writing custom interceptors

Skip it when

  • You are not using Dio (e.g., using http or other client)
  • You require production‑grade logging to a file or remote service

Strengths

  • Easy to add with a single line
  • Highly configurable (include/exclude headers, bodies, etc.)
  • Supports multiple content types and custom logging filters

Weaknesses

  • Works only with Dio, not other HTTP clients
  • Adds overhead to each request due to formatting
  • Limited to console output; no built‑in file or remote logging

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
final dio = Dio();
dio.interceptors.add(HttpFormatter());
await dio.get('https://example.com');

Alternatives

Packages that do the same job and could replace dio_http_formatter.

  • alice

    Advanced HTTP network inspector and logger with a native UI for Flutter.

  • alice_dio

    Dio interceptor and network logger for Alice network inspector UI

  • http2

    An HTTP/2 implementation in Dart for low-level transport and pooled HTTP/2 requests.

  • dio_web_adapter

    Web and WASM HTTP client adapter for Dio.

Works with

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