Skip to content

worksofindustry/restapi_golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple REST API in GOlang

Simple RESTful API to create, read, update and delete books.

Quick Start

# Install multiplex router
go get -u github.com/gorilla/mux
go build
./go_restapi

Endpoints

Get All Books

GET api/books

Get Single Book

GET api/books/{id}

Delete Book

DELETE api/books/{id}

Create Book

POST api/books

# Request sample
# {
#   "isbn":"4545454",
#   "title":"Book Three",
#   "author":{"firstname":"Harry",  "lastname":"White"}
# }

Update Book

PUT api/books/{id}

# Request sample
# {
#   "isbn":"4545454",
#   "title":"Updated Title",
#   "author":{"firstname":"Harry",  "lastname":"White"}
# }

About

Demo of RestAPI in Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published