cargo run
After you update the code, restart the server via cargo run and use these curls to post, update, get, and delete items.
--header 'Content-Type: application/json' \
--header 'Content-Type: text/plain' \
--data-raw '{
"name": "apple",
"quantity": 3
}'
curl --location --request PUT 'localhost:3030/v1/basket' \
--header 'Content-Type: application/json' \
--header 'Content-Type: text/plain' \
--data-raw '{
"name": "apple",
"quantity": 5
}'
curl --location --request GET 'localhost:3030/v1/basket' \
--header 'Content-Type: application/json' \
--header 'Content-Type: text/plain'
curl --location --request DELETE 'localhost:3030/v1/basket' \
--header 'Content-Type: application/json' \
--header 'Content-Type: text/plain' \
--data-raw '{
"name": "apple"
}'