func (this *WeixinController) Post() { if ret, _ := weixin.CheckSignature(this.Ctx.ResponseWriter, this.Ctx.Request); ret == true { handleRequest(this.Ctx.ResponseWriter, this.Ctx.Request) } else { log.Println(this.Ctx.ResponseWriter, "invalid!") } }
func (this *WeixinController) Get() { if ret, echostr := weixin.CheckSignature(this.Ctx.ResponseWriter, this.Ctx.Request); ret == true { fmt.Fprintf(this.Ctx.ResponseWriter, echostr) } else { log.Println(this.Ctx.ResponseWriter, "invalid!") } }