hteapot 0.6.5

HTeaPot is a lightweight HTTP server library designed to be easy to use and extend.
Documentation
1
2
3
4
5
6
7
8
9
use hteapot::{Hteapot, HttpRequest, HttpResponse, HttpStatus};

fn main() {
    let server = Hteapot::new("localhost", 8081);
    server.listen(move |_req: HttpRequest| {
        // This will be executed for each request
        HttpResponse::new(HttpStatus::IAmATeapot, "Hello, I am HTeaPot", None)
    });
}