func Kefu(w http.ResponseWriter, req *http.Request) {
//2018/11/19 15:45:11 /kf?signature=21db514acf702211d5118488ef65c2e7deef2d53&echostr=711491803160476671×tamp=1542613511&nonce=1036331002
query := req.URL.Query()
fmt.Println("\n------------signature-------------", query["signature"][0])
fmt.Println("\n------------timestamp-------------",query["timestamp"][0])
fmt.Println("\n------------nonce-------------", query["nonce"][0])
echostr:= query["echostr"][0]
fmt.Println("\n------------echostr-------------", echostr)
w.Write([]byte(echostr))
}
有疑问加站长微信联系(非本文作者)