zeke 0.1.6

a http library for rust built on top of tokio
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16


use crate::http::handler::Handler;
use crate::http::response::Response;


pub fn handle_home() -> Handler {
    return Handler::new(|request| {
        Box::pin(async move {
            let response = Response::new()
                .status(200)
                .body("Hello, World!");
            return (request, response);
        })
    });
}