# apple/swift-http-types

Version-independent HTTP currency types for Swift

Repository: https://github.com/apple/swift-http-types
Canonical: https://ross.abutalabs.com/products/swift-http-types
Language: Swift
License: Apache-2.0
License Family: permissive
Last push: 2026-08-31T09:30:56+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 63, longevity 98
- inputs: {"age_days": 1385, "days_push": 2, "days_rel": 89, "gap_med": 169.0, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1033, forks 79 (observed 2026-09-01T02:13:58.875607+00:00)

## What it is
Swift HTTP Types is an Apple-maintained Swift library providing version-independent HTTP request, response, and header field types usable by both clients and servers. It includes Foundation conveniences for URLSession and URL conversion, plus SwiftNIO channel handlers for HTTP/1 and HTTP/2 integration.

## Use cases
- represent http requests and responses in swift
- share http types between client and server code
- use modern http types with urlsession
- bridge swift-nio http1 and http2 to common types
- manage http header fields in swift

## When to choose
- you build Swift HTTP clients or servers and want version-independent types
- you need a common HTTP abstraction across URLSession and SwiftNIO
- you want Apple-supported, modern HTTP primitives for Swift

## When to avoid
- you work outside the Swift ecosystem
- you need a full HTTP client or server implementation rather than types
- your project already standardizes on Foundation URL types exclusively

## Facets
- artifact type: library
- maturity: active
- function: http-client, http-server, sdk
- domain: web-development, backend, developer-tools, apis
- platform: cross-platform
- tags: http-types, swift-nio, urlsession, apple, http-headers, foundation, swift, macos, linux, ios

## Member repositories
- apple/swift-http-types (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-09-01T02:13:58.875607+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-30T07:07:32.353100+00:00, confidence not recorded.
  - readme: https://github.com/apple/swift-http-types (fetched 2026-09-01T02:13:58.875607+00:00, sha b745d02ae57f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
