I am beginner to go language. I have downloaded this project (https://github.com/goadesign/goa-cellar) and ran it in local environement. It works well when I make post,get,list calls using goa-cellar client.
Steps:-
Server:-
Following are the sample requests which works well for me using goa-cellar client:
Client:-
I want to make above request using curl or via Postman (chrome addon) or browser add on. How can I do it ?
I have tried the following:-
1. Create account
Method: POST
URL:- http://localhost:8082
Request body: {"name": "test"}
Request headers:- Content-Type: application/json
Response:-
{
"code": "not_found",
"status": 404,
"detail": "/"
}
Server log:-
INFO[06-23|19:08:25] started req_id=RQLpC8kzbF-2 POST=/ from=127.0.0.1 ctrl=<unknown> action=<unknown>
INFO[06-23|19:08:25] payload req_id=RQLpC8kzbF-2 raw=null
INFO[06-23|19:08:25] completed req_id=RQLpC8kzbF-2 status=404 error=not_found bytes=47 time=97.542µs
Just make sending data to the right HTTP API endpoint, in your case, instead this /
, need use to cellar/accounts
(http://localhost:8082/cellar/accounts)
By POST
you make saving data and by GET
+ id
- retreive data.
Look at README for detail info for using this project.