mirror of
https://github.com/actix/examples
synced 2025-06-29 10:14:58 +02:00
@ -10,8 +10,8 @@ use rustls::{NoClientAuth, ServerConfig};
|
||||
async fn index(req: HttpRequest) -> HttpResponse {
|
||||
println!("{:?}", req);
|
||||
HttpResponse::Ok()
|
||||
.content_type("text/plain")
|
||||
.body("Welcome!")
|
||||
.content_type("text/html; charset=utf-8")
|
||||
.body("<!DOCTYPE html><html><body><p>Welcome!</p></body></html>")
|
||||
}
|
||||
|
||||
#[actix_web::main]
|
||||
|
Reference in New Issue
Block a user