Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bernardobarreto/go-gin-basic-rest-api
Sample REST API written with Go using Gin
https://github.com/bernardobarreto/go-gin-basic-rest-api
gin golang rest-api
Last synced: 22 days ago
JSON representation
Sample REST API written with Go using Gin
- Host: GitHub
- URL: https://github.com/bernardobarreto/go-gin-basic-rest-api
- Owner: bernardobarreto
- Created: 2023-07-21T03:37:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-22T19:41:00.000Z (over 1 year ago)
- Last Synced: 2024-11-09T14:46:39.563Z (3 months ago)
- Topics: gin, golang, rest-api
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Albums API
### Running
```
go get .
go run .
```### GET /albums
```
curl http://localhost:3000/albums
```### GET /albums/:id
```
curl http://localhost:3000/albums/2
```### POST /albums
```
curl http://localhost:3000/albums \
--include \
--header "Content-Type: application/json" \
--request "POST" \
--data '{"id": "4","title": "The Modern Sound of Betty Carter","artist": "Betty Carter","price": 49.99}'
```