Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/digininja/gin_tutorial
Learning to build web apps in Gin. Don't expect anything new or ground breaking, I'm just following tutorials.
https://github.com/digininja/gin_tutorial
gin go golang
Last synced: 3 months ago
JSON representation
Learning to build web apps in Gin. Don't expect anything new or ground breaking, I'm just following tutorials.
- Host: GitHub
- URL: https://github.com/digininja/gin_tutorial
- Owner: digininja
- License: gpl-3.0
- Created: 2021-03-15T20:20:26.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-28T18:20:20.000Z (almost 4 years ago)
- Last Synced: 2024-05-13T00:35:47.254Z (8 months ago)
- Topics: gin, go, golang
- Language: Go
- Homepage:
- Size: 65.4 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golang-repositories - gin_tutorial
README
# Gin Tutorial
Following [this tutorial](https://semaphoreci.com/community/tutorials/building-go-web-applications-and-microservices-using-gin).
It's [GitHub](https://github.com/demo-apps/go-gin-app) page.
Another one to look at.
## Curl Commands
Get the API version:
```
curl -H "Accept: application/json" http://localhost:8080/api/ver
```Now needs keys:
```
curl -X POST --data "apiKey=123" -H "apiKey: 123" http://localhost:8080/api/ver -H "Accept: application/json"
```## Submit and handle JSON
```
curl -X POST http://localhost:8080/robin -H "Accept: application/json" -H "Content-Type: application/json" --data '{"url":"test.com"}'
```## Testing
To test everything:
```
go test -v
```