2020-09-24 22:54:01 +00:00
|
|
|
use actix_web_codegen::*;
|
2020-09-13 15:31:08 +00:00
|
|
|
|
|
|
|
#[get("/one", other)]
|
2020-09-24 22:54:01 +00:00
|
|
|
async fn one() -> String {
|
|
|
|
"Hello World!".to_owned()
|
2020-09-13 15:31:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[post(/two)]
|
2020-09-24 22:54:01 +00:00
|
|
|
async fn two() -> String {
|
|
|
|
"Hello World!".to_owned()
|
2020-09-13 15:31:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static PATCH_PATH: &str = "/three";
|
|
|
|
|
|
|
|
#[patch(PATCH_PATH)]
|
2020-09-24 22:54:01 +00:00
|
|
|
async fn three() -> String {
|
|
|
|
"Hello World!".to_owned()
|
2020-09-13 15:31:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[delete("/four", "/five")]
|
2020-09-24 22:54:01 +00:00
|
|
|
async fn four() -> String {
|
|
|
|
"Hello World!".to_owned()
|
2020-09-13 15:31:08 +00:00
|
|
|
}
|
|
|
|
|
2020-09-22 21:42:51 +00:00
|
|
|
#[delete("/five", method="GET")]
|
2020-09-24 22:54:01 +00:00
|
|
|
async fn five() -> String {
|
|
|
|
"Hello World!".to_owned()
|
2020-09-22 21:42:51 +00:00
|
|
|
}
|
|
|
|
|
2020-09-13 15:31:08 +00:00
|
|
|
fn main() {}
|