hooch_http
hooch_http is a lightweight, asynchronous HTTP server framework built on top of the hooch runtime. It provides fast HTTP parsing, simple route matching, support for path/query parameters, and middleware integration—all with zero heap allocations for request parsing.
✨ Features
- Fully Async Server: Built with
hoochfor scalable, non-blocking I/O. - Zero-Allocation Parsing: Efficiently parses HTTP/1.1 requests including headers and body using direct byte slice manipulation.
- Route Matching: Define routes with parameterized URIs (e.g.,
/user/{id}) and extract dynamic segments in a type-safe manner. - Query Parameter Extraction: Easily parse and iterate over query strings.
- Middleware Support: Register middleware to intercept, log, or modify requests, or to short-circuit request handling by providing an immediate response.
- Low-Latency: Designed for resource-constrained and performance-critical applications.
🚀 Example
use hooch_main;
use ;
async