Query String Get User Data GinGonic golang framework 12
Query String Get User Data GinGonic golang framework 12
Source Code
// QueryString // /?user=ali&city=newyork package main import "github.com/gin-gonic/gin" func main() { // new server r := gin.Default() // GET or Post request r.GET("/", func(c *gin.Context) { // how to get data from user through url? form? username := c.DefaultQuery("user", "unknown") // if user didn't type ...default value is unknown city := c.Query("city") // no need for default value c.String(200, "Hello %s from %s", username, city) }) r.Run() }
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