http_logging 0.1.0

  • Installing
  • Versions
  • 78


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.

Use this package as a library

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 flutter 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 Jul 13, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
58 / 100
Code health derived from static analysis. [more]
98 / 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 analysis and formatting issues.

    Analysis or formatting checks reported 2 hints.

    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+17
http_parser >=0.0.1 <4.0.0 3.1.2
Transitive dependencies
async 2.0.7
charcode 1.1.2
collection 1.14.10
path 1.6.1
source_span 1.4.0
string_scanner 1.0.2
typed_data 1.1.5
Dev dependencies
test ^0.12.32