TODO : use database instead of slice
# Install mux router
go get -u github.com/gorilla/mux
go build
./Main
GET movies
GET movies/{id}
DELETE movies/{id}
POST movies/
# Request sample
{
"title": "Mari Pulang",
"rating": "5.6",
"year": 2019,
"actor": {
"name": "Rahmatullah",
"age": 22
}
}
PUT movies/{id}
# Request sample
{
"title": "Mari Pulang Bersama",
"rating": "5.6",
"year": 2019,
"actor": {
"name": "Rahmatullah aka matx",
"age": 22
}
}
Muh Rahmatullah