package controllers import ( "fmt" "net/http" "github.com/astaxie/beego" ) type EclpController struct { beego.Controller } func (c *EclpController) Msg() { if c.Ctx.Input.Method() == http.MethodPost { fmt.Println("testElcp", c.Ctx.Request.Body) c.Data["json"] = c.Ctx.Request.Body c.ServeJSON() } else { c.Abort("404") } }