http
The shared Rust crate defining Request, Response, and other core HTTP types
Repository Health
Technical Analysis
http is a foundational Rust crate providing the shared Request, Response, Method, StatusCode, Uri, Version, and HeaderMap types that most of the Rust HTTP ecosystem — hyper, tonic, axum, reqwest, tower, and many others — builds on top of. Rather than each HTTP-adjacent crate defining its own incompatible request/response representations, they all depend on http so values can move between a client, a server, and any middleware in between without conversion glue.
The crate intentionally contains no networking, parsing, or I/O code of its own; it exists purely to standardize the vocabulary types that HTTP-related crates pass to each other, with an optimized HeaderMap implementation as its most substantial piece of internal logic.
What You Get
Request<T>andResponse<T>generic types with ergonomic builder APIs for constructing HTTP messagesHeaderMap- a purpose-built multi-map optimized for HTTP header storage and case-insensitive lookupMethod,StatusCode,Uri, andVersiontypes shared across the entire Rust HTTP ecosystem- Zero-copy-friendly
HeaderName/HeaderValuetypes backed bybytes::Bytes - Conversion trait implementations (
convert.rs) so common std types interoperate cleanly with the crate’s types
Common Use Cases
- Defining the request/response types passed between a client and server built on hyper, tonic, or axum
- Writing HTTP middleware (a
tower::Layer) that needs to inspect or modify headers, method, or status without depending on any particular server implementation - Implementing a new HTTP client or server that wants to interoperate with the existing hyper-ecosystem tooling out of the box
- Building an HTTP proxy or gateway that manipulates requests/responses using a common, well-tested type vocabulary
Under The Hood
Architecture Across roughly 14,500 lines, the crate is organized around independent, focused modules — request.rs and response.rs define the generic Request<T>/Response<T> builder types, header/ implements the HeaderMap/HeaderName/HeaderValue trio as its own self-contained sub-module, and method.rs, status.rs, version.rs, uri/ each own one small, well-scoped vocabulary type — reflecting the crate’s deliberate scope discipline of shipping types and nothing else. Tech Stack Depends on bytes for zero-copy byte storage in header values and little else, keeping the dependency graph shallow since this crate sits at the base of the dependency tree for a large share of the Rust HTTP ecosystem (hyper, axum, tonic, reqwest, tower). Code Quality tests/header_map.rs and tests/header_map_fuzz.rs reflect that HeaderMap — the crate’s most algorithmically complex piece, since it’s a custom hash-map variant tuned for HTTP header access patterns — receives targeted fuzz testing in addition to conventional unit tests, appropriate rigor for a type this deeply relied upon. API Design The builder pattern on Request/Response (Request::builder().method(...).uri(...).body(...)) is now the de facto idiom across the Rust HTTP ecosystem precisely because this crate established it first, and extensive From/TryFrom conversions in convert.rs mean callers rarely need explicit type-conversion boilerplate at API boundaries.
Used by 18 apps in this directory
agentgateway
AI Development · Developer Tools
An open source AI-native proxy that secures, observes, and governs agent-to-LLM, agent-to-tool, and agent-to-agent communication through MCP, A2A, and unified LLM routing.
Anarlog
Note Taking · AI Assistants · Productivity
Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.
fabro
Developer Tools · Devops
Define AI agent workflows as code graphs, route tasks across any LLM, and intervene only where it matters.
headroom
AI Development · Developer Tools
Compress everything your AI agent reads — tool outputs, logs, RAG chunks, and files — before it reaches the LLM, achieving 60–95% fewer tokens with the same answers.
hoodik
File Storage · Security
Self-hosted, end-to-end encrypted cloud storage with browser-based encryption and S3-compatible storage support
Hook0
Devops
Open-source Webhooks-as-a-Service: deliver events to your users with auto-retry, signed payloads, and a real-time subscriber dashboard — all without building the infrastructure yourself.
Hoppscotch
Developer Tools
A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.
Kuku
Note Taking
A local-first, open-source Markdown knowledge workspace for macOS — plain files, personal wiki and Second Brain workflows, AI-assisted diffs, and encrypted sync, built as an Obsidian alternative.
LanceDB
Databases · AI Development
Open-source, embedded vector database built on the Lance columnar format for fast multimodal search across billions of vectors, backed by Y Combinator (W23).