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

插件详情v3.2.3

http_multi_server

一个处理来自多个服务器的请求的 dart:io HttpServer 包装器。

AndroidiOSmacOSWindowsLinux
近 30 天下载
1520万
喜欢数
48
Pub 分数
160

安装插件

flutter pub add http_multi_server

插件介绍

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

一个 Dart 包,用于封装 dart:io 的 HttpServer,以同时管理来自多个服务器的 HTTP 请求。它通过提供统一接口来监听多个端口或地址,简化了服务器处理,非常适合开发工具和测试环境。该包轻量级,并与 Dart 内置网络功能无缝集成。支持所有主要平台,包括移动、桌面和服务器环境。

适合场景

  • 运行多个开发服务器
  • 使用不同端点测试Web应用程序
  • 使用嵌入式服务器构建 CLI 工具
  • 管理代理或网关服务
  • 从多个端口提供内容

主要特点

  • 支持多个并发HTTP服务器
  • 用于管理服务器实例的简单 API
  • 跨平台兼容性
  • 基于 dart:io 以实现高性能
  • 非常适合开发和测试工作流程

适合对象

  • Dart 开发人员构建后端工具
  • 测试自动化工程师
  • CLI 应用程序创建者
  • Web 框架维护者
  • 开发环境设置

使用建议

  • 不适用于生产级Web应用程序
  • 需要手动管理服务器生命周期
  • 仅限 HTTP 协议(默认不支持 HTTPS)
  • 依赖 dart:io,因此不适用于网页浏览器
  • 最适合在受控的开发场景中使用

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

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目