Expand description
async_tiny is a minimal async HTTP server with a tiny_http-like feel, built on Hyper 1.x.
Designed for simplicity and clarity, it lets you handle HTTP requests using a clean, synchronous-style loop—without exposing Hyper internals or requiring complex async plumbing.
§How it works
- Hyper accepts connections and parses requests.
- Each request body is fully buffered into
Bytes. - A simplified
Request(method, headers, URL, body) is sent over anmpscchannel. - You receive it via
Server::next().awaitand respond usingreq.respond(Response). - The response is translated back into Hyper and sent to the client.
This design avoids sending Hyper types across threads and keeps everything Send.
It’s ideal for small web apps, embedded tools, or frameworks like Velto.
Structs§
- Header
- A simple “Name: value” header wrapper (tiny_http style).
- Header
Name - Represents an HTTP header field name
- Header
Value - Represents an HTTP header field value.
- Request
- A tiny_http-like request handed to your loop.
- Response
- A tiny response wrapper (status, headers, body).
- Server
- The main server: bind with Server::http(…).await?, then loop server.next().await.