1
0
mirror of https://github.com/actix/examples synced 2024-11-28 00:12:57 +01:00
examples/basics/nested-routing/README.md

21 lines
780 B
Markdown
Raw Normal View History

2019-04-09 20:12:07 +02:00
This example illustrates how to use nested resource registration through application-level configuration.
The endpoints do nothing.
## Usage
2022-02-18 04:36:04 +01:00
```sh
cd basics/nested-routing
cargo run
# Started http server: 127.0.0.1:8080
```
### Available Routes
- [POST /products](http://localhost:8080/products)
- [GET /products](http://localhost:8080/products)
- [GET /products/:product_id](http://localhost:8080/products/:product_id)
- [DELETE /products/:product_id](http://localhost:8080/products/:product_id)
- [GET /products/:product_id/parts](http://localhost:8080/products/:product_id/parts)
- [POST /products/:product_id/parts](http://localhost:8080/products/:product_id/parts)
- [GET /products/:product_id/parts/:part_id](http://localhost:8080/products/:product_id/parts/:part_id)