todo-server-rust is a Rust(actix-web) application provides Rest APIs that uses create, update and delete operations.
git clone https://github.com/ahmetsahinoglu/todo-server-rust.git
cd todo-server-rust$ export PORT=YOUR_PORT_NUMBER$ cargo run$ cargo build --release$ cargo test- Get TodoList http:127.0.0.1:{PORT}/v1/todo-list GET
- Create Todo http:127.0.0.1:{PORT}/v1/todo-list POST
- Update Todo http:127.0.0.1:{PORT}/v1/todo-list/{id} PATCH
- Delete Todo http:127.0.0.1:{PORT}/v1/todo-list/{id} DELETE
###USAGE
curl --location --request GET 'http:127.0.0.1:8080/v1/todo-list'
curl --location --request POST 'http:127.0.0.1:8080/v1/todo-list' \
--header 'Content-Type: application/json' \
--data-raw '{
"text": "Pay rent.",
"status": "ACTIVE"
}'
curl --location --request PUT 'localhost:8080/v1/todo-list/1' \
--header 'Content-Type: application/json' \
--data-raw '{
"text": "Pay rent.",
"status": "DONE"
}'
curl --location --request DELETE 'localhost:8080/v1/todo-list/1'
[
{
"id": 1,
"text": "Pay rent.",
"status": "DONE"
},
{
"id": 2,
"text": "Prepare suitcase.",
"status": "ACTIVE"
}
]