Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 646 Bytes

README.md

File metadata and controls

28 lines (22 loc) · 646 Bytes

GoRestAPI

A simple Golang REST API that can do CRUD operations with Gorm, Echo and PostgreSQL

getUser:

curl localhost:1323/users/{id}

getAllUsers:

curl localhost:1323/users

createUser:

curl -X POST -H 'Content-Type:application/json' -d '{"first_name":"foo","last_name":"bar","age":"24","email":"foobar@foobar.com"}' localhost:1323/users

updateUser:

curl -X PUT -H 'Content-Type:application/json' -d '{"first_name":"foo","last_name":"bar","age":"24","email":"foobar@foobar.com"}' localhost:1323/users/{id}

deleteUser:

curl -X DELETE localhost:1323/users/{id}