京东eclp回调测试

This commit is contained in:
苏尹岚
2020-03-09 14:30:16 +08:00
parent bd66b3e303
commit 88cae31e91
3 changed files with 25 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
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")
}
}