23 lines
351 B
Go
23 lines
351 B
Go
package controllers
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
|
|
"github.com/astaxie/beego/server/web"
|
|
)
|
|
|
|
type EclpController struct {
|
|
web.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")
|
|
}
|
|
}
|