mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-19 07:38:57 +08:00
```go package main import ( "github.com/gin-gonic/gin" ) func main() { router := gin.Default() router.POST("/", func(c *gin.Context) { var s string c.BindPlain(&s) c.String(200, s) }) router.Run() } // client // curl -d "test string" 127.0.0.1:8080 // output // test string ```
9 lines
80 B
Plaintext
9 lines
80 B
Plaintext
*~
|
|
vendor/*
|
|
!vendor/vendor.json
|
|
coverage.out
|
|
count.out
|
|
test
|
|
profile.out
|
|
tmp.out
|