1
0
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:
Rob Ede
2020-09-24 23:54:01 +01:00
committed by GitHub
parent 162121bf8d
commit c53e9468bc
14 changed files with 124 additions and 69 deletions

View File

@ -1,30 +1,30 @@
use actix_web::*;
use actix_web_codegen::*;
#[get("/one", other)]
async fn one() -> impl Responder {
HttpResponse::Ok()
async fn one() -> String {
"Hello World!".to_owned()
}
#[post(/two)]
async fn two() -> impl Responder {
HttpResponse::Ok()
async fn two() -> String {
"Hello World!".to_owned()
}
static PATCH_PATH: &str = "/three";
#[patch(PATCH_PATH)]
async fn three() -> impl Responder {
HttpResponse::Ok()
async fn three() -> String {
"Hello World!".to_owned()
}
#[delete("/four", "/five")]
async fn four() -> impl Responder {
HttpResponse::Ok()
async fn four() -> String {
"Hello World!".to_owned()
}
#[delete("/five", method="GET")]
async fn five() -> impl Responder {
HttpResponse::Ok()
async fn five() -> String {
"Hello World!".to_owned()
}
fn main() {}