gitmyhub

dio

Dart ★ 13k updated 4d ago

A powerful HTTP client for Dart and Flutter, which supports global settings, Interceptors, FormData, aborting and canceling a request, files uploading and downloading, requests timeout, custom adapters, etc.

Dio is a powerful HTTP networking library for Flutter and Dart apps, adding interceptors, file uploads, request cancellation, and cookie management on top of Dart's built-in networking.

DartFluttersetup: easycomplexity 2/5

Dio is an HTTP client library for Dart and Flutter, the programming language and mobile app framework made by Google. When a Flutter app needs to communicate with a server over the internet, such as fetching data from an API or uploading a file, it needs a tool to handle those network requests. Dio is that tool, and it adds a range of features on top of what Dart includes by default.

The description lists what dio covers: global configuration that applies to every request your app makes, interceptors that can inspect or modify requests and responses before they reach your code, support for sending form data, the ability to cancel a request that is already in flight, file uploads and downloads, and timeout handling so requests that take too long do not hang forever. Developers can also swap in custom adapters if they need to change how the underlying connection is made, for example to use HTTP/2 or the device's native networking layer.

The repository is organized as a monorepo, meaning the core library and several official plugins all live together in one place. Separate plugin packages handle cookie management, HTTP/2 support, a native adapter that uses the operating system's own network stack, and a web adapter for running in browsers. Each package is published independently to pub.dev, which is the standard package registry for Dart.

The project was originally created by a developer named wendux and was later transferred to the Chinese Flutter User Group for ongoing maintenance. It is released under the MIT license. The root README is intentionally minimal and points readers toward the individual package directories for more detailed documentation.

Where it fits