How dart-lang/http works
This repository is a Dart networking-package monorepo. The principal workflow is an application using package:http to make a request and consume an HTTP resource; the README describes the API as composable and multi-platform. Other packages provide HTTP/2, HTTP parsing and server support, profiling, native client integrations, and WebSocket APIs. The sampled source is mostly platform-runner boilerplate, so internal calls and most package-to-package relationships are not established here; dashed links mark those unverified integrations.
Main entry points: http.dart HTTP API · request.dart Requests and responses · io_client.dart Platform transports · retry.dart Retry client
Components 16
HTTP client
- HTTP API
pkgs/http/lib/http.dart - Requests and responses
pkgs/http/lib/src/request.dart - Platform transports
pkgs/http/lib/src/io_client.dart - Retry client
pkgs/http/lib/retry.dart - Multipart requests
pkgs/http/lib/src/multipart_request.dart
Protocols and servers
- HTTP/2
pkgs/http2/lib/src/connection.dart - HTTP parser
pkgs/http_parser/lib - Multi-server wrapper
pkgs/http_multi_server/lib - Network profiling
pkgs/http_profile/lib
Native clients
- Cronet client
pkgs/cronet_http/lib/src/cronet_client.dart - Cupertino client
pkgs/cupertino_http/lib/src/cupertino_client.dart - OkHttp client
pkgs/ok_http/lib
WebSocket
- WebSocket API
pkgs/web_socket/lib - Stream channel API
pkgs/web_socket_channel/lib
Other components
- Application
- HTTP resource
Connections 15
- Application → HTTP API: makes requests
README.md - HTTP API → HTTP resource: consumes resources
README.md - HTTP API → Requests and responses: composes
- HTTP API → Platform transports: uses transport
- HTTP API → Retry client: supports retries
- HTTP API → Multipart requests: supports multipart
- Application → HTTP/2: uses HTTP/2
- Application → HTTP parser: parses formats
- Application → Multi-server wrapper: serves requests
- Application → Network profiling: profiles traffic
- Application → Cronet client: selects client
- Application → Cupertino client: selects client
- Application → OkHttp client: selects client
- Application → WebSocket API: communicates over
- Application → Stream channel API: uses channel API