パッケージ、リポジトリ、アプリカテゴリを検索

GitHub リポジトリfluttercandies/http_client_helper

http_client_helper

キャンセルおよび再試行機能を備えたHTTPリクエスト用のFlutterプラグイン。

http_client_helper のプロジェクト画像
スター
28
フォーク
12
最終プッシュ(UTC)
2024/06/24
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

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.

FlutterCandies GitHub avatar
GitHub 作者

FlutterCandies ↗

Custom Flutter candies (packages) for you to build your Flutter app easily. Enjoy it!

言語DartObjective-CJava

カテゴリー

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 1 件

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗