dio README

The project's README from github.com/cfug/dio. As one markdown file: README.md.

dio

Language: English | 简体中文

This is the base repo of the dio project. Please move to specific paths for project instructions.

Don't forget to add #dio topic to your published dio-related packages! See more: https://dart.dev/tools/pub/pubspec#topics

Versioning

Before you upgrade: Breaking changes might happen in major and minor versions of packages.
See the Migration Guide for the complete breaking changes list.

To know about our compatibility policy, see the Compatibility Policy doc.

All Packages

dio

Plugins

Examples

The project and its underlying projects are originally authored by @wendux with the organization @flutterchina, started being maintained by Chinese Flutter User Group (@cfug) since 2023.

The project consents the MIT license.

dio (cfug/dio)

Searching Database…

12.8K ·GitHub
这是什么?dio 是一个功能强大的 Dart 和 Flutter 开源 HTTP 客户端,在 GitHub 上约有 12.8k 星标。这个仓库是它的基础 monorepo,包含核心包、配套插件和示例应用。
它是我安装的应用,还是加到我代码里的库?它是一个库:你需要把 dio 包作为依赖添加到你的 Dart 或 Flutter 项目中,而不是一个独立程序。这个仓库还提供配套插件和可直接运行的示例应用。
我怎么把它加到我的项目里?把 dio 作为 pub 依赖添加——Flutter 里用 'flutter pub add dio',纯 Dart 里用 'dart pub add dio'。核心包位于本 monorepo 的 dio/ 目录,旁边还有 example/ 和 exampleflutterapp/ 两个示例。
在次要版本更新 dio 会不会破坏我的代码?有可能——维护者提醒即使次要版本也可能出现破坏性变更,所以每次升级前请先阅读迁移指南(Migration Guide)和兼容性政策文档。
纯 Dart 里能用吗,还是必须要 Flutter?都可以:dio 同时面向 Dart 和 Flutter,并为不同运行环境提供适配器插件——浏览器用的 web 适配器、对接各平台 HTTP 栈的原生 Dio 适配器,以及 HTTP/2 适配器。
dio 开箱即用能做什么?包括全局请求配置、拦截器、FormData、中止和取消请求、文件上传下载、请求超时,以及自定义适配器等功能。
这个仓库里附带哪些配套包?有 Cookie 管理、兼容层、HTTP/2、原生 Dio 适配器和 web 适配器等插件,外加两个示例应用(example 和 exampleflutterapp)。
dio 还在积极开发吗?是的——仓库配置了测试、覆盖率、发布等 CI 工作流以及 CodeQL 安全分析,项目自 2018 年以来已获得约 12.8k 星标。
Creator
cfug
Size
5.1 MB
Stars
12.8K
Age
8y
Commits · 90 Days