mirror of
https://github.com/actix/examples
synced 2025-06-27 01:27:43 +02:00
This commit is contained in:
17
databases/mysql/apis/addbank.txt
Normal file
17
databases/mysql/apis/addbank.txt
Normal file
@ -0,0 +1,17 @@
|
||||
1.
|
||||
Linux
|
||||
|
||||
curl -d '{"bank_name":"Bank ABC","country":"Kenya"}' -H 'Content-Type: application/json' http://127.0.0.1:8080/addbank
|
||||
|
||||
2.
|
||||
Windows
|
||||
|
||||
curl -H "Content-type:application/json" --data-binary "{\"bank_name\":\"Bank ABC\",\"country\":\"Kenya\"}" http://127.0.0.1:8080/addbank
|
||||
|
||||
3.
|
||||
Json response
|
||||
|
||||
{
|
||||
"status_code": 0,
|
||||
"status_description": "Successful"
|
||||
}
|
18
databases/mysql/apis/addbranch.txt
Normal file
18
databases/mysql/apis/addbranch.txt
Normal file
@ -0,0 +1,18 @@
|
||||
1.
|
||||
Linux
|
||||
|
||||
curl -d '{"branch_name":"HQ branch", "location":"Central Business District"}' -H 'Content-Type: application/json' http://127.0.0.1:8080/addbranch
|
||||
|
||||
2.
|
||||
Windows
|
||||
|
||||
curl -H "Content-type:application/json" --data-binary "{\"branch_name\":\"HQ branch\", \"location\":\"Central Business District\"}" http://127.0.0.1:8080/addbranch
|
||||
|
||||
|
||||
3.
|
||||
Json response
|
||||
|
||||
{
|
||||
"status_code": 0,
|
||||
"status_description": "Successful"
|
||||
}
|
18
databases/mysql/apis/addcustomer.txt
Normal file
18
databases/mysql/apis/addcustomer.txt
Normal file
@ -0,0 +1,18 @@
|
||||
1.
|
||||
Linux
|
||||
|
||||
curl -d '{"customer_name":"Peter Paul", "branch_name":"Central Business District"}' -H 'Content-Type: application/json' http://127.0.0.1:8080/addcustomer
|
||||
|
||||
2.
|
||||
Windows
|
||||
|
||||
curl -H "Content-type:application/json" --data-binary "{\"customer_name\":\"Peter Paul\", \"branch_name\":\"Central Business District\"}" http://127.0.0.1:8080/addcustomer
|
||||
|
||||
|
||||
3.
|
||||
Json response
|
||||
|
||||
{
|
||||
"status_code": 0,
|
||||
"status_description": "Successful"
|
||||
}
|
18
databases/mysql/apis/addteller.txt
Normal file
18
databases/mysql/apis/addteller.txt
Normal file
@ -0,0 +1,18 @@
|
||||
1.
|
||||
Linux
|
||||
|
||||
curl -d '{"teller_name":"John Doe", "branch_name":"Central Business District"}' -H 'Content-Type: application/json' http://127.0.0.1:8080/addteller
|
||||
|
||||
2.
|
||||
Windows
|
||||
|
||||
curl -H "Content-type:application/json" --data-binary "{\"teller_name\":\"John Doe\", \"branch_name\":\"Central Business District\"}" http://127.0.0.1:8080/addteller
|
||||
|
||||
|
||||
3.
|
||||
Json response
|
||||
|
||||
{
|
||||
"status_code": 0,
|
||||
"status_description": "Successful"
|
||||
}
|
23
databases/mysql/apis/getbank.txt
Normal file
23
databases/mysql/apis/getbank.txt
Normal file
@ -0,0 +1,23 @@
|
||||
1.
|
||||
Linux
|
||||
|
||||
curl 'http://localhost:8080/getbank'
|
||||
|
||||
2.
|
||||
Windows
|
||||
|
||||
curl http://localhost:8080/getbank
|
||||
|
||||
3.
|
||||
Json response
|
||||
|
||||
{
|
||||
"status_code": 0,
|
||||
"status_description": "Successful",
|
||||
"bank_data": [
|
||||
{
|
||||
"bank_name": "bank abc",
|
||||
"country": "kenya"
|
||||
}
|
||||
]
|
||||
}
|
23
databases/mysql/apis/getbranch.txt
Normal file
23
databases/mysql/apis/getbranch.txt
Normal file
@ -0,0 +1,23 @@
|
||||
1.
|
||||
Linux
|
||||
|
||||
curl 'http://localhost:8080/getbranch'
|
||||
|
||||
2.
|
||||
Windows
|
||||
|
||||
curl http://localhost:8080/getbranch
|
||||
|
||||
3.
|
||||
Json response
|
||||
|
||||
{
|
||||
"status_code": 0,
|
||||
"status_description": "Successful",
|
||||
"branch_data": [
|
||||
{
|
||||
"branch_name": "hq branch",
|
||||
"location": "central business district"
|
||||
}
|
||||
]
|
||||
}
|
23
databases/mysql/apis/getcustomer.txt
Normal file
23
databases/mysql/apis/getcustomer.txt
Normal file
@ -0,0 +1,23 @@
|
||||
1.
|
||||
Linux
|
||||
|
||||
curl 'http://localhost:8080/getcustomer'
|
||||
|
||||
2.
|
||||
Windows
|
||||
|
||||
curl http://localhost:8080/getcustomer
|
||||
|
||||
3.
|
||||
Json response
|
||||
|
||||
{
|
||||
"status_code": 0,
|
||||
"status_description": "Successful",
|
||||
"customer_data": [
|
||||
{
|
||||
"customer_name": "peter paul",
|
||||
"branch_name": "central business district"
|
||||
}
|
||||
]
|
||||
}
|
23
databases/mysql/apis/getteller.txt
Normal file
23
databases/mysql/apis/getteller.txt
Normal file
@ -0,0 +1,23 @@
|
||||
1.
|
||||
Linux
|
||||
|
||||
curl 'http://localhost:8080/getteller'
|
||||
|
||||
2.
|
||||
Windows
|
||||
|
||||
curl http://localhost:8080/getteller
|
||||
|
||||
3.
|
||||
Json response
|
||||
|
||||
{
|
||||
"status_code": 0,
|
||||
"status_description": "Successful",
|
||||
"teller_data": [
|
||||
{
|
||||
"teller_name": "john doe",
|
||||
"branch_name": "central business district"
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user