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

插件详情v4.1.2

http_parser

一个跨平台的包,用于解析和序列化HTTP格式。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1310万
喜欢数
271
Pub 分数
160

安装插件

flutter pub add http_parser

插件介绍

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

http_parser 包提供跨平台的实用工具,用于解析和序列化 HTTP 标头、状态行以及其他 HTTP 格式组件。它设计用于在所有主要平台上运行,包括 Android、iOS、Web、macOS、Windows 和 Linux。这个轻量级库支持高效处理 HTTP 消息,而无需依赖完整的 HTTP 客户端,非常适合低级别 HTTP 操作。它确保无论底层平台如何,都能保持一致的行为,使开发者能够构建出稳健的网络通信层,并获得可预测的解析结果。

适合场景

  • 在自定义 HTTP 客户端中解析 HTTP 标头
  • 序列化HTTP请求/响应数据
  • 构建用于HTTP处理的中间件
  • 在跨平台应用中实现HTTP协议逻辑
  • 在服务器端 Dart 代码中处理原始 HTTP 流

主要特点

  • 跨平台兼容性
  • 高效的头部解析和序列化
  • 轻量且无依赖
  • 支持请求和响应解析
  • 对格式错误的HTTP数据的健壮错误处理

适合对象

  • 开发自定义 HTTP 客户端的开发者
  • 需要在跨平台环境中保持一致的 HTTP 解析的团队
  • 需要低级别HTTP协议控制的项目
  • 具有实时或流式 HTTP 需求的 Dart 应用程序
  • 使用 Dart 进行 HTTP 消息处理的后端服务

使用建议

  • 不适用于完整的HTTP客户端功能
  • 需要手动处理 HTTP 连接
  • 最好与 http_client 等传输层配合使用
  • 仅限HTTP格式解析,不完整HTTP堆栈
  • 安全关键应用可能需要额外的验证

原始 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 项

源码仓库

使用此插件的项目

所在榜单