http_client_helper 0.1.9

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 86

http_client_helper #

pub package

A Flutter plugin for http request with cancel and retry fuctions.

Usage #

To use this plugin, add http_client_helper as a dependency in your pubspec.yaml file.

Example #

  cancellationToken = new CancellationToken();
      try {
        await HttpClientHelper.get(url,
                cancelToken: cancellationToken,
                timeRetry: Duration(milliseconds: 100),
                retries: 3,
                timeLimit: Duration(seconds: 5))
            .then((response) {
          setState(() {
            msg = response.body;
          });
        });
      } on TimeoutException catch (_) {
        setState(() {
          msg = "TimeoutException";
        });
      } on OperationCanceledError catch (_) {
        setState(() {
          msg = "cancel";
        });
      } catch (e) {
        setState(() {
          msg = "$e";
        });
      }

Please see the example app of this plugin for a full example.

[0.1.9]

  • add OnTimeout onTimeout parameter for all method

[0.1.8]

  • add other method of http

[0.1.7]

  • add timeLimit for timeout

[0.1.5]

  • format code

[0.1.4]

  • remove map to string for post

[0.1.3]

  • make all http_client_helper darts as library http_client_helper

[0.1.2]

  • Fix retries for retry helper.

[0.1.1]

  • Handle map body.

[0.1.0]

  • Upgrade Some Commments.

[0.0.1]

  • Initial Open Source release.

example/README.md

example #

A new Flutter application.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

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


dependencies:
  http_client_helper: ^0.1.9

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support 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_client_helper/http_client_helper.dart';
  
Version Uploaded Documentation Archive
0.1.9 Apr 10, 2019 Go to the documentation of http_client_helper 0.1.9 Download http_client_helper 0.1.9 archive
0.1.7 Feb 14, 2019 Go to the documentation of http_client_helper 0.1.7 Download http_client_helper 0.1.7 archive
0.1.6 Jan 22, 2019 Go to the documentation of http_client_helper 0.1.6 Download http_client_helper 0.1.6 archive
0.1.5 Jan 21, 2019 Go to the documentation of http_client_helper 0.1.5 Download http_client_helper 0.1.5 archive
0.1.4 Dec 12, 2018 Go to the documentation of http_client_helper 0.1.4 Download http_client_helper 0.1.4 archive
0.1.3 Dec 10, 2018 Go to the documentation of http_client_helper 0.1.3 Download http_client_helper 0.1.3 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
72
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
86
Learn more about scoring.

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

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.4.7

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0-dev.68.0 <3.0.0
flutter 0.0.0
http ^0.12.0 0.12.0+2
Transitive dependencies
async 2.2.0
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
meta 1.1.6 1.1.7
path 1.6.2
pedantic 1.5.0
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test