搜索插件、代码仓与 APP 分类

插件详情v3.1.0

http2

Dart 中的 HTTP/2 实现。

AndroidiOSmacOSWindowsLinux
近 30 天下载
85.8万
喜欢数
96
Pub 分数
150

安装插件

flutter pub add http2

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Dart 实现的 HTTP/2 协议,可在客户端和服务器之间实现高性能、多路复用通信。专为 Flutter 和其他 Dart 应用程序设计,支持现代 Web 标准,具备高效的请求处理能力和更低的延迟。该包是官方 Dart HTTP 生态系统的一部分,可与现有 HTTP 工作流程无缝集成。专为需要通过 HTTP/2 的高级功能(如流多路复用和头压缩)实现更快网络交互的开发者设计。

适合场景

  • 高性能 API 客户端
  • 实时数据流
  • 高效的移动和桌面网络
  • 降低Web服务中的延迟
  • 多流HTTP通信

主要特点

  • 支持 HTTP/2 多路复用
  • 内置标题压缩
  • 通过 TLS 的安全连接
  • 与 Dart 的 HttpClient 集成
  • 轻量且模块化的设计

适合对象

  • 开发快速网络应用的开发者
  • 需要并发请求的应用程序
  • 使用现代 HTTP 协议的项目
  • 需要优化网络连接的Flutter应用
  • 高吞吐量后端服务

使用建议

  • 需要 TLS 才能完全支持 HTTP/2
  • 仅限 Dart 环境
  • 不适用于仅支持 HTTP/1.1 的用例
  • 取决于底层平台的网络堆栈
  • 可能需要为自定义服务器进行额外配置

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Build Status

A composable, Future-based library for making HTTP requests.

package:http contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's multi-platform, and supports mobile, desktop, and the browser.

Packages

Package Description Version
cronet_http An Android Flutter plugin that provides access to the Cronet HTTP client. pub package
cupertino_http A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. pub package
flutter_http_example An Flutter app that demonstrates how to configure and use package:http. —
http A composable, multi-platform, Future-based API for HTTP requests. pub package
http2 A HTTP/2 implementation in Dart. pub package
http_client_conformance_tests A library that tests whether implementations of package:http's Client class behave as expected.
http_multi_server A dart:io HttpServer wrapper that handles requests from multiple servers. pub package
http_parser A platform-independent package for parsing and serializing HTTP formats. pub package
http_profile A library used by HTTP client authors to integrate with the DevTools Network View. pub package
ok_http An Android Flutter plugin that provides access to the OkHttp HTTP client and the OkHttp WebSocket API. pub package
web_socket Any easy-to-use library for communicating with WebSockets that has multiple implementations. pub package
web_socket_channel StreamChannel wrappers for WebSockets. Provides a cross-platform WebSocketChannel API. package issues
web_socket_conformance_tests A library that tests whether implementations of package:web_socket's WebSocket class behave as expected.

Contributing

If you'd like to contribute to any of these packages, see the Contributing Guide.

所属分类

依赖

依赖清单 4 项

源码仓库

使用此插件的项目