flipperkit_http_interceptor 0.0.1

  • Readme
  • Changelog
  • Installing
  • 72

flipperkit_http_interceptor #

pub package Donate

English | 简体中文

flutter_flipperkit does not support global interception of http library network requests, please set the network plugin useHttpOverrides parameter to false.

Getting Started #

Prerequisites #

Before starting make sure you have:

Installation #

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

dependencies:
  flipperkit_http_interceptor: ^0.0.2

You can install packages from the command line:

$ flutter packages get

Usage #

void main() {
  FlipperClient flipperClient = FlipperClient.getDefault();

  flipperClient.addPlugin(new FlipperNetworkPlugin(
    // If you use http library, you must set it to false
    useHttpOverrides: false,
  ));
  flipperClient.start();

  runApp(MyApp());
}

...

import 'package:flipperkit_http_interceptor/flipperkit_http_interceptor.dart';

void sendRequest() async {
  var http = new HttpClientWithInterceptor();
  var response = http.get("https://example.com");
}

Discussion #

If you have any suggestions or questions about this project, you can discuss it by Telegram Group or my wechat.

License #

MIT License

Copyright (c) 2019 JianyingLi <lijy91@foxmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

0.0.1 #

  • Initial release

Use this package as a library

1. Depend on it

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


dependencies:
  flipperkit_http_interceptor: ^0.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:flipperkit_http_interceptor/flipperkit_http_interceptor.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
70
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
38
Overall:
Weighted score of the above. [more]
72
Learn more about scoring.

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

  • Dart: 2.6.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/flipperkit_http_interceptor.dart.

Run flutter format to format lib/flipperkit_http_interceptor.dart.

Format lib/http_client_with_interceptor.dart.

Run flutter format to format lib/http_client_with_interceptor.dart.

Maintenance issues and suggestions

Use constrained dependencies. (-20 points)

The pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies: http.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and flipperkit_http_interceptor.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Update README.md. (-2 points)

1 image link is insecure (e.g. http://blankapp.org/assets/images/wechat_qrcode.png), use https URLs instead.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
flutter_flipperkit ^0.0.17 0.0.20
http any 0.12.0+2
uuid ^2.0.0 2.0.2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.3
http_parser 3.1.3
meta 1.1.7 1.1.8
path 1.6.4
pedantic 1.8.0+1
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test