• Stars
    star
    161
  • Rank 233,470 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 9 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sample Application Structure for Echo

echo-sample

Sample Application Structure for micro Web Application Framework Echo.

HTTP Request Sample

POST

curl -H "Content-Type: application/json" -X POST -d '{"name":"Luis", "number": 9, "position": "FW"}' http://localhost:8888/api/v1/members
curl -H "Content-Type: application/json" -X POST -d '{"name":"Lionel", "number": 10, "position": "FW"}' http://localhost:8888/api/v1/members

# => {"number":10, "name":"Lionel", "position":"FW", "createdAt":1465415304}

GET a record

curl -H "Content-Type: application/json" -X GET http://localhost:8888/api/v1/members/10

# => {"number":10, "name":"Lionel", "position":"FW", "createdAt":1465415304}

GET records

curl -H "Content-Type: application/json" -X GET http://localhost:8888/api/v1/members

# => [
       {"number":9, "name":"Luis", "position":"FW", "createdAt":1465415304},
       {"number":10,"name":"Lionel", "position":"FW", "createdAt":1465415304}
     ]