Skip to content

cjunius/rest-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rest-go

Test REST-API written in Go

Provides a REST endpoint for any resource accepting a JSON body

HTTP METHOD ENDPOINT Description Example
POST localhost:8080/{resource} Creates a resource and adds/overwrites an id attribute POST /dogs
GET localhost:8080/{resource} Retrieves a list of resources GET /dogs
GET localhost:8080/{resource}/{id} Retrieves a specific resource GET /dogs/1
PUT localhost:8080/{resource}/{id} Replaces a specific resource PUT /dogs/2
PATCH localhost:8080/{resource}/{id} Updates a specific resource with a new/updated attribute PATCH /dogs/3
DELETE localhost:8080/{resource}/{id} Removes a specific resource DELETE /dogs/4

Usage:

Alternative Usage:

  • docker pull cjunius/rest-go:main
  • docker run --name rest-go -d -p 8080:8080 cjunius/rest-go:main

About

Test REST-API written in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages