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

パッケージ詳細v0.3.1

sync_http

Dart用の同期HTTPクライアント。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
959万
いいね数
16
Pub ポイント
120

パッケージをインストール

flutter pub add sync_http

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

sync_http は、非同期操作が望ましくない環境で HTTP リクエストを簡単に実行できるように設計された、Dart 向けの同期 HTTP クライアントです。GET、POST、PUT などの HTTP メソッドを同期的に実行するためのシンプルな API を提供し、応答が受信されるまで実行をブロッキングします。これにより、CLI ツールやスクリプトなど、単純で直線的な制御フローが必要な用途に適しています。このパッケージは Google によってメンテナンスされており、Android、iOS、macOS、Windows、Linux など複数のプラットフォームをサポートしています。

用途

  • コマンドラインツール
  • スクリプトワークフロー
  • シンプルなデータ取得
  • 同期バックエンド処理
  • HTTP インタラクションのテスト

主な機能

  • 同期リクエスト処理
  • シンプルで直感的な API
  • クロスプラットフォーム対応
  • 軽量でミニマル
  • 組み込みエラー処理

適している対象

  • ブロッキングHTTP呼び出しを必要とする開発者
  • UI以外のアプリケーション
  • プロトタイピングとテスト
  • レガシーコードの統合
  • シンプルなオートメーションスクリプト

注意事項

  • ブロッキングの性質上、UIスレッドには適していません
  • 非同期代替案と比較してスケーラビリティが限定的
  • 高スループットのシナリオではパフォーマンス上の問題が発生する可能性があります
  • 非インタラクティブなコンテキストでのみ最適に使用してください

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Dart CI pub package package publisher

A Dart HTTP client implemented using RawSynchronousSockets to allow for synchronous HTTP requests.

Using this package

Note: this package is only intended for very specialized use cases. For general HTTP usage, please see instead package:http.

This library should probably only be used to connect to HTTP servers that are hosted on 'localhost'. The operations in this library will block the calling thread to wait for a response from the HTTP server. The thread can process no other events while waiting for the server to respond. As such, this synchronous HTTP client library is not suitable for applications that require high performance. Instead, such applications should use libraries built on asynchronous I/O, including dart:io and package:http, for the best performance.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト