mirror of
https://github.com/actix/examples
synced 2024-11-23 22:41:07 +01:00
674 B
674 B
Tellers API
All examples show cURL and HTTPie snippets.
Adding A Teller
curl -d '{"teller_name":"John Doe", "branch_name":"Central Business District"}' -H 'Content-Type: application/json' http://localhost:8080/teller
http POST :8080/teller teller_name="John Doe" branch_name="Central Business District"
You should expect a 204 No Content response.
Listing Tellers
curl http://localhost:8080/teller
http :8080/teller
The response should be a 200 OK with the following JSON body:
{
"teller_data": [
{
"teller_name": "john doe",
"branch_name": "central business district"
}
]
}