adding html to responder, and improving responder, adding data to server
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
use http_body_util::Full;
|
||||
use hyper::{
|
||||
body::{Bytes, Incoming},
|
||||
Request, Response,
|
||||
body::{Bytes, Incoming},
|
||||
};
|
||||
use servme::{Responder, Server};
|
||||
use std::convert::Infallible;
|
||||
@@ -16,5 +16,5 @@ async fn main() {
|
||||
}
|
||||
|
||||
async fn handler(req: Request<Incoming>) -> Result<Response<Full<Bytes>>, Infallible> {
|
||||
Responder::text(&format!("Hello World! {}", req.uri()))
|
||||
Responder::ok(format!("Hello World! {}", req.uri()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user