Skip to content

llfrometa89/poc-http4s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages