package main
import (
"net/http"
"github.com/gin-gonic/gin"
)
func main() {
r := gin.Default()
r.POST("/form", PostForm)
r.Run(":5000")
}
func PostForm(ctx *gin.Context) {
username := ctx.PostForm("username")
password := ctx.PostForm("password")
ctx.JSON(200, gin.H{
"status": http.StatusOK,
"data": map[string]interface{}{
"username": username,
"password": password,
},
})
}