qmetrics.net

dio

HTTP networking package for Dart and Flutter apps

dio screenshot

Dio is an HTTP client for Dart and Flutter with global settings, interceptors, uploads, downloads, timeouts, and custom adapters.

Overview

Dio helps Dart and Flutter applications talk to web APIs and download or upload data over HTTP. You create a client instance, set defaults such as base URL and timeouts, and issue GET, POST, QUERY, and other requests with optional query parameters and bodies.

The client supports request cancellation, progress callbacks for uploads and downloads, response typing as streams or raw bytes, and FormData for multipart uploads including multiple files. Interceptors let you log traffic, queue requests, or rewrite options and responses; transformers can change how bodies are encoded or decoded.

On the web, downloads use the browser’s save flow and CORS rules still apply. Optional plugins in the ecosystem add cookie management, HTTP/2, native adapters, and web-specific adapters. Third-party plugins can extend behavior further.

Dio runs wherever Dart and Flutter are supported, including mobile, desktop, and browser targets. Install it as a pub package dependency and import it into application code.

Key features

  • Global BaseOptions and per-request Options
  • Interceptors and QueuedInterceptor
  • FormData and multipart file uploads
  • Request cancellation and timeouts
  • Custom HttpClientAdapter and transformers
  • File download with progress callbacks
  • HTTP/2 and web adapter plugins
  • QUERY method with request body support

Use cases

  • REST API calls in Flutter apps
  • File uploads with progress reporting
  • Shared HTTP defaults across a codebase
  • Middleware-style request and response hooks
  • Concurrent parallel HTTP requests

Tags

Similar software

FastAPI

Python web framework for building APIs with type hints

FastAPI is a Python web framework for building APIs using standard type hints. It builds on Starlette and Pydantic and generates interactive OpenAPI documentation for the endpoints you define.

★ 105.1k⟳ 9 days agoMIT

NestJS

Progressive TypeScript framework for Node.js backends

Nest organizes Node server apps with modules, dependency injection, and first-party packages for auth, data, queues, and observability.

★ 77.2k⟳ todayMIT

OkHttp

HTTP client for JVM, Android, and GraalVM

OkHttp is an HTTP client library tuned for efficient networking on Android, Java, and GraalVM native images. It offers synchronous and asynchronous call APIs with a fluent request builder.

★ 47.1k⟳ yesterdayApache-2.0
Frameworks & PlatformsDesktop/CLI app

gRPC

Cross-language remote procedure call framework

gRPC is an RPC framework that lets client and server programs communicate transparently and supports building connected, multi-language systems.

★ 45.5k⟳ todayApache-2.0

tRPC

End-to-end typesafe TypeScript APIs without code generation

tRPC helps teams define server procedures and call them from clients with full TypeScript types for inputs, outputs, and errors—no schemas or codegen step.

★ 40.9k⟳ todayMIT
Frameworks & PlatformsDesktop/CLI app

go-zero

Cloud-native Go microservices and RPC framework

go-zero is a Go web and RPC framework with code generation, built-in resilience middleware, and tooling aimed at stable high-traffic services.

★ 33.5k⟳ 9 days agoMIT