Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpdrsn committed Jun 22, 2023
1 parent 13ca1b1 commit d365241
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions axum/src/docs/routing/route.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,18 @@ async fn delete_root() {}
Or you can add them one by one:

```rust
# use axum::Router;
# use axum::routing::{get, post, delete};
#
let app = Router::new()
.route("/", get(get_root))
.route("/", post(post_root))
.route("/", delete(delete_root));
#
# let _: Router = app;
# async fn get_root() {}
# async fn post_root() {}
# async fn delete_root() {}
```

# More examples
Expand Down

0 comments on commit d365241

Please sign in to comment.