http_logging 0.1.0

  • Installing
  • Versions
  • new71


A HTTP client middleware which logs request and response data.

Build Status

import 'dart:async';

import 'package:http/http.dart';
import 'package:http_logging/http_logging.dart';

Future<Null> main() async {
  Client loggingClient = new LoggingClient(
      // Wrap a Client to log all its requests and responses.
      new Client(),
      // Select the log level between basic (default), headers, and body.
      level: LoggingLevel.body,
      // Pass in a logger, by default it uses the print method.
      logger: (msg) => print("HTTP: $msg"));


It's highly inspired by the OkHTTP logging interceptor.

Change Log

Version 0.1.0


Initial release.

1. Depend on it

Add this to your package's pubspec.yaml file:

  http_logging: "^0.1.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:http_logging/http_logging.dart';
Version Uploaded Documentation Archive
0.1.0 Mar 11, 2018 Go to the documentation of http_logging 0.1.0 Download http_logging 0.1.0 archive


We analyzed this package on Mar 11, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.31.0
  • pana: 0.10.3


Describes how popular the package is relative to other packages. [more]
43 / 100
Code health derived from static analysis. [more]
99 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:http_logging/http_logging.dart.


  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use http_logging.dart.

  • Fix issues reported by dartanalyzer or dartfmt.

    dartanalyzer or dartfmt reported 1 hint.

    Run dartfmt to format lib/http_logging.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.0 <2.0.0
http ^0.11.0 0.11.3+16
http_parser >=0.0.1 <4.0.0 3.1.1
Transitive dependencies
async 2.0.6
charcode 1.1.1
collection 1.14.6
path 1.5.1
source_span 1.4.0
string_scanner 1.0.2
typed_data 1.1.5
Dev dependencies
test ^0.12.32