Skip to main content

netlens_http_client 1.0.0 copy "netlens_http_client: ^1.0.0" to clipboard
netlens_http_client: ^1.0.0 copied to clipboard

NetLens adapter for dart:io HttpClient. Catches HttpClient calls for the NetLens in-app HTTP inspector and lets NetLens resend them.

NetLens for HttpClient from dart:io #

pub package

Connects NetLens, the in-app HTTP inspector for Flutter, to HttpClient from dart:io.

Install #

dependencies:
  netlens: ^1.1.0
  netlens_http_client: ^1.0.0

Use #

import 'dart:io';
import 'package:netlens/netlens.dart';
import 'package:netlens_http_client/netlens_http_client.dart';

final netLens = NetLens();
final adapter = NetLensHttpClientAdapter();
netLens.addAdapter(adapter);

HttpClient()
    .getUrl(Uri.parse('https://api.example.com/users'))
    .interceptWithNetLens(adapter);

Mocks #

To replay mocks recorded by NetLens, start NetLensMockServer and point your requests at its URL:

final server = NetLensMockServer(resolver: netLens.mocks);
final Uri baseUrl = await server.start();

See Mocks.

Documentation #

You can find the documentation here.

Credits #

NetLens is a fork of Alice by Jakub Homlala and its contributors, licensed under the Apache License 2.0.

0
likes
160
points
53
downloads

Documentation

API reference

Publisher

verified publishershewa.tech

Weekly Downloads

NetLens adapter for dart:io HttpClient. Catches HttpClient calls for the NetLens in-app HTTP inspector and lets NetLens resend them.

Repository (GitHub)
View/report issues

Topics

#http #inspector #netlens #interceptor

License

Apache-2.0 (license)

Dependencies

netlens

More

Packages that depend on netlens_http_client