Speedy HTTP server built purely in Rust. Comes with built-in GZIP compression and HTTPS support.
Uses procedural macros for easy API building.
Example 1:
```rust use std::net::TcpListener; use tinyhttp::prelude::*;
fn main() { let socket = TcpListener::bind(":::9001").unwrap(); let routes = Routes::new(vec![get(), post()]); let config = Config::new().routes(routes); let http = HttpListener::new(socket, config);
http.start(); }
fn get(_body: Request) -> &'static str { "Hello, World!" }
fn post(body: Request) -> &'static str { "Hi, there!" } ```