# dart-lang/http

A composable API for making HTTP requests in Dart.

Repository: https://github.com/dart-lang/http
Canonical: https://ross.abutalabs.com/products/dart-lang-http
Homepage: https://pub.dev/packages/http
Language: Dart
License: BSD-3-Clause
License Family: permissive
Topics: dart, flutter, http, http-client
Last push: 2026-09-03T00:01:14+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 42, longevity 100
- inputs: {"age_days": 4277, "days_push": 0, "days_rel": 391, "gap_med": 16, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1109, forks 420 (observed 2026-09-03T02:15:11.073958+00:00)

## What it is
package:http is the official Dart/Flutter library providing a composable, Future-based API for making HTTP requests across mobile, desktop, web, and wasm platforms. It includes a Client abstraction with swappable implementations (IOClient, BrowserClient, Cronet, OkHttp, Cupertino) plus wrappers like RetryClient and MockClient.

## Use cases
- make http requests in dart
- fetch data from an api in flutter
- call a rest api from a dart app
- retry failed http requests automatically
- mock http responses in dart tests
- use websockets in dart
- make http requests that work on web and mobile

## When to choose
- you're building a Dart or Flutter app that consumes HTTP APIs
- you need one client API that works across mobile, desktop, web, and wasm
- you want composable client wrappers for retries, logging, or mocking
- you want platform-native HTTP stacks like Cronet, OkHttp, or NSURLSession

## When to avoid
- you need a low-level socket or raw TCP client rather than HTTP
- you're not working in Dart or Flutter
- you need server-side features like routing or middleware for serving requests (use shelf instead)
- you need advanced gRPC or non-HTTP protocols

## Facets
- artifact type: library
- maturity: stable
- function: http-client, websocket, middleware
- domain: web-development, developer-tools, apis, cross-platform
- platform: cross-platform, windows, browser, wasm
- tags: dart, flutter, http, future-based, composable-clients, retry, mock-client, http2, networking, android, ios, macos, linux

## Member repositories
- dart-lang/http (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:11.073958+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:43:34.546997+00:00, confidence not recorded.
  - readme: https://github.com/dart-lang/http (fetched 2026-09-03T02:15:11.073958+00:00, sha 513d2c793e48)
  - homepage: https://pub.dev/packages/http (fetched 2026-08-29T12:47:11.121201+00:00, sha cb84983a7ef5)
  - site_page: https://pub.dev/packages/http/install (fetched 2026-08-29T12:47:11.132595+00:00, sha e5745678ff66)
  - site_page: https://pub.dev/documentation/http/latest/http/Client-class.html (fetched 2026-08-29T12:47:11.134617+00:00, sha 93077a9ccb51)
  - site_page: https://pub.dev/documentation/http/latest/http/Request-class.html (fetched 2026-08-29T12:47:11.136295+00:00, sha cada5f58325a)
  - site_page: https://pub.dev/documentation/http/latest/http/StreamedRequest-class.html (fetched 2026-08-29T12:47:11.137895+00:00, sha cea372ed0018)
  - site_page: https://pub.dev/documentation/http/latest/http/Client/send.html (fetched 2026-08-29T12:47:11.139422+00:00, sha 2bd3ab61892e)
  - site_page: https://pub.dev/documentation/http/latest/http/BaseClient-class.html (fetched 2026-08-29T12:47:11.140870+00:00, sha dce59e2884e8)
  - site_page: https://pub.dev/documentation/http/latest/retry/RetryClient-class.html (fetched 2026-08-29T12:47:11.142378+00:00, sha 47906ec84847)
  - site_page: https://pub.dev/packages/http/changelog (fetched 2026-08-29T12:47:11.130506+00:00, sha abd27c4383e3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
