Skip to content

Latest commit

 

History

History
36 lines (31 loc) · 801 Bytes

README.md

File metadata and controls

36 lines (31 loc) · 801 Bytes

poc-http4s

Prerequisites

To follow this Readme you need to have installed: cURL or HTTPie

Create Account

Request

$ curl -d '{"name":"Livan","email":"[email protected]", "amount":200}' -X POST http://localhost:9000/accounts
or
$ http POST :9000/accounts name="Livan" email=:"[email protected]" amount=200

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "no": "1546"
}

Transfer Money

Request

curl -d '{"senderAccountNo":"8135","receiverAccountNo":"287", "amount":100}' -X POST http://localhost:9000/accounts/transfer
or
http POST :9000/accounts/transfer senderAccountNo="8135" receiverAccountNo="287" amount=200

Response

Success transfer

Resources