mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 15:07:42 +02:00
prepare codegen 0.4.0 release (#1702)
This commit is contained in:
@ -1,12 +1,14 @@
|
||||
use actix_web::*;
|
||||
use actix_web_codegen::*;
|
||||
|
||||
#[route("/", method="GET", method="HEAD")]
|
||||
async fn index() -> impl Responder {
|
||||
HttpResponse::Ok()
|
||||
async fn index() -> String {
|
||||
"Hello World!".to_owned()
|
||||
}
|
||||
|
||||
#[actix_web::main]
|
||||
async fn main() {
|
||||
use actix_web::{App, test};
|
||||
|
||||
let srv = test::start(|| App::new().service(index));
|
||||
|
||||
let request = srv.get("/");
|
||||
|
Reference in New Issue
Block a user