A simple web API that can manage "to-do" items stored in a database, using the Rust Web Framework Actix.
$ rustc -V
# rustc 1.41.0 (5e1a79984 2020-01-27)
$ cargo -V
# cargo 1.41.0 (626f0f40e 2019-12-03)
From the root directory of this project:
cargo run
# Started http server: 127.0.0.1:8080
With REST client like Postman, Insomnia and others.
| API | Description | Request body | Response body |
|---|---|---|---|
| GET /api/TodoItems | Get all to-do items | None | Array of to-do items |
| GET /api/TodoItems/{id} | Get an item by ID | None | To-do item |
| POST /api/TodoItems | Add a new item | To-do item | To-do item |
| PUT /api/TodoItems/{id} | Update an existing item | To-do item | None |
| DELETE /api/TodoItems/{id} | Delete an item | None | None |
- Actix web rust web framework
- Actix web examples
- Rust language web site
- The Rust Programming Language book
- The Cargo Book
This project is licensed by MIT license (http://www.apache.org/licenses/LICENSE-2.0)
Welcome to contribute!