Skip to main content

netlens_http 1.1.0 copy "netlens_http: ^1.1.0" to clipboard
netlens_http: ^1.1.0 copied to clipboard

NetLens adapter for the http package. Catches http calls for the NetLens in-app HTTP inspector and lets NetLens resend them.

NetLens for http #

pub package

Connects NetLens, the in-app HTTP inspector for Flutter, to http.

Install #

dependencies:
  netlens: ^1.1.0
  netlens_http: ^1.1.0

Use #

import 'package:http/http.dart' as http;
import 'package:netlens/netlens.dart';
import 'package:netlens_http/netlens_http.dart';

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

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

Mocks #

NetLensHttpMockClient answers requests with mocks recorded by NetLens, so the app can run offline:

final client = NetLensHttpMockClient(resolver: netLens.mocks);
netLens.mocks.mode = NetLensMockMode.replay;
await client.get(url).interceptWithNetLens(adapter);

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
175
downloads

Documentation

API reference

Publisher

verified publishershewa.tech

Weekly Downloads

NetLens adapter for the http package. Catches http 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

http, netlens

More

Packages that depend on netlens_http