Skip to content

Latest commit

 

History

History
55 lines (45 loc) · 788 Bytes

README.md

File metadata and controls

55 lines (45 loc) · 788 Bytes

GOLang RESTful API

RESTful API to create, read, delete and update Users. (database implementation will be added later)

Bash Start

# Installing mux router
go get -u github.com/gorilla/mux
# generate and run .exe
go build
./REST_API

Testing the API

Get All Users

GET api/user

Get a user

GET api/user/{Username}

Create a User

POST api/user

# Request 
# {
#   "Username":"meee",
#   "Firstname":"EL Mehdi",
#   "lastname":"SOUMMER",
#   "Email":"test@gmail.com",
# }

Delete a User

DELETE api/user/{Username}

Update a User

PUT api/user/{Username}

# Request 
# {
#   "Username":"hiiii",
#   "Firstname":"Mehdi",
#   "lastname":"SOUMMMMER",
#   "Email":"test1@gmail.com",
# }