MCPcopy Create free account
hub / github.com/actix/examples / index

Function index

https-tls/rustls/src/main.rs:12–20  ·  view source on GitHub ↗

simple handle

(req: HttpRequest)

Source from the content-addressed store, hash-verified

10
11/// simple handle
12async fn index(req: HttpRequest) -> HttpResponse {
13 debug!("{req:?}");
14
15 HttpResponse::Ok().content_type(ContentType::html()).body(
16 "<!DOCTYPE html><html><body>\
17 <p>Welcome to your TLS-secured homepage!</p>\
18 </body></html>",
19 )
20}
21
22#[actix_web::main]
23async fn main() -> std::io::Result<()> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected