Skip to main content

chic_http_logger 0.1.0 copy "chic_http_logger: ^0.1.0" to clipboard
chic_http_logger: ^0.1.0 copied to clipboard

A pretty, boxed console logger for package:http — request/response headers, bodies, status, and timing rendered like pretty_dio_logger, with zero Flutter dependency.

example/example.dart

import 'package:chic_http_logger/chic_http_logger.dart';
import 'package:http/http.dart' as http;

Future<void> main() async {
  final client = ChicHttpLogger(
    innerClient: http.Client(),
    compact: false, // pretty-print JSON bodies instead of minifying them
  );

  try {
    await client.get(
      Uri.parse('https://jsonplaceholder.typicode.com/todos/1'),
    );

    await client.post(
      Uri.parse('https://jsonplaceholder.typicode.com/posts'),
      headers: {'content-type': 'application/json'},
      body: '{"title": "foo", "body": "bar", "userId": 1}',
    );
  } finally {
    client.close();
  }
}
3
likes
160
points
137
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A pretty, boxed console logger for package:http — request/response headers, bodies, status, and timing rendered like pretty_dio_logger, with zero Flutter dependency.

Repository (GitHub)
View/report issues

Topics

#http #logging #networking #debugging

License

MIT (license)

Dependencies

http

More

Packages that depend on chic_http_logger