如何为果阿地窖项目创建卷曲请求或在邮递员(附件)中创建卷曲请求

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:-

  1. go get github.com:goadesign/goa-cellar.git
  2. goagen bootstrap -d
  3. goa-cellar/design go build

Server:-

  1. Start Server -> /.goa-cellar

Following are the sample requests which works well for me using goa-cellar client:

Client:-

  1. Create a account -> ./cellar-cli create account /cellar/accounts --payload '{"name": "test"}'
  2. List account -> ./cellar-cli list account
  3. Show account -> ./cellar-cli show account /cellar/accounts/1

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.