2 ms·
What couchand said still applies to 1.0. So this should work: use actix_web::{web, App, HttpServer, HttpRequest, Responder}; fn index(req: HttpRequest,
by iBelieve 7y ago
What couchand said still applies to 1.0. So this should work:
use actix_web::{web, App, HttpServer, HttpRequest, Responder};
fn index(req: HttpRequest, info: web::Path<(u32, String)>) -> impl Responder {
format!("[{}] Hello {}! id:{}", req.method(), info.1, info.0)
}