Get request Json array 4 – GinGonic Golang Web Framwork
Get request Json array 4 – GinGonic Golang Web Framwork
Source Code
// Get Request -- Array/ slice data package main import "github.com/gin-gonic/gin" func main() { // create router/server r := gin.Default() // get request // mention path and callback function r.GET("/", func(c *gin.Context) { // 200 is status code here // data is slice/array form c.JSON(200, []string{ "firstname", "2nd person name", "3rd value", "so on..."}) }) r.Run() //port :8080 }
golang gingonic framework videos tutorials series
TAGS#
gin gonic tutorial
gin-gonic / examples
gin-gonic documentation
gin framework tutorial
gin web framework
gin router
golang gin context
gin router group
###Buy Me a Coffee https://www.buymeacoffee.com/khan1