http-server 0.8.9

Simple and configurable command-line HTTP server
Documentation
1
2
3
4
5
6
7
8
9
use anyhow::Result;
use http::{Request, Response};
use hyper::Body;

use super::handler::HttpHandler;

pub async fn main_service(handler: HttpHandler, req: Request<Body>) -> Result<Response<Body>> {
    handler.handle_request(req).await
}