mirror of
https://github.com/actix/examples
synced 2024-11-24 06:43:00 +01:00
42 lines
613 B
Plaintext
42 lines
613 B
Plaintext
1.
|
|
Linux
|
|
|
|
curl -d '{"bank_name":"Bank ABC","country":"Kenya"}' -H 'Content-Type: application/json' http://127.0.0.1:8080/bank
|
|
|
|
2.
|
|
Windows
|
|
|
|
curl -H "Content-type:application/json" --data-binary "{\"bank_name\":\"Bank ABC\",\"country\":\"Kenya\"}" http://127.0.0.1:8080/bank
|
|
|
|
3.
|
|
JSON response
|
|
|
|
{
|
|
"status_code": 0,
|
|
"status_description": "Successful"
|
|
}
|
|
|
|
4.
|
|
Linux
|
|
|
|
curl 'http://localhost:8080/bank'
|
|
|
|
5.
|
|
Windows
|
|
|
|
curl http://localhost:8080/bank
|
|
|
|
6.
|
|
JSON response
|
|
|
|
{
|
|
"status_code": 0,
|
|
"status_description": "Successful",
|
|
"bank_data": [
|
|
{
|
|
"bank_name": "bank abc",
|
|
"country": "kenya"
|
|
}
|
|
]
|
|
}
|