京东eclp回调测试
This commit is contained in:
22
controllers/eclp_callback.go
Normal file
22
controllers/eclp_callback.go
Normal 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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user