the async micro http server
tbc...
```rust use http::Method;
use microweb::filter::header; use microweb::router::{get, post}; use microweb::{handlerfn, Router, Server};
async fn simplehandler1(method: &Method, str: Option
async fn simplehandler2(method: &Method) -> String { format!("handler_2: receive from method: {}\r\n", method) }
async fn simplehandler3(method: &Method, str: Option
async fn simplehandler4(method: &Method, str: Option
async fn default_handler() -> &'static str { "404 not found" }
async fn main() { let router = Router::builder() .route("/", get(handlerfn(simplehandler1))) .route( "/", post(handlerfn(simplehandler2)) .with(header(http::header::CONTENTTYPE, mime::APPLICATIONWWWFORMURLENCODED.asref())), ) .route("/", post(handlerfn(simplehandler3))) .route("/4", get(handlerfn(simplehandler_4))) .build();
Server::builder()
.router(router)
.address("127.0.0.1:8080")
.default_handler(handler_fn(default_handler))
.build()
.unwrap()
.start()
.await;
} ```