command
module
Version:
v0.0.0-...-3b34607
Opens a new window with list of versions in this module.
Published: Mar 21, 2021
License: GPL-3.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Gin Tutorial
Following this tutorial.
It's GitHub page.
Another one to look at. https://blog.logrocket.com/how-to-build-a-rest-api-with-golang-using-gin-and-gorm/
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
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.