From 12f91594656c1ed49a7ac8505ae4d111f06a130f Mon Sep 17 00:00:00 2001 From: 陆恒 Date: Thu, 30 Apr 2020 09:54:44 +0800 Subject: [PATCH] 提交测试接口 --- src/HttpServer/logic/httpserver.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+), 0 deletions(-) diff --git a/src/HttpServer/logic/httpserver.go b/src/HttpServer/logic/httpserver.go index 1de45ca..5dbd3bb 100644 --- a/src/HttpServer/logic/httpserver.go +++ b/src/HttpServer/logic/httpserver.go @@ -29,6 +29,10 @@ func CheckErr(err error) { } func startServerHttpServe() { + //------------------------------------------------------------- + http.HandleFunc("/catcafe/ClearData", ClearData) //情况账号的测试接口 + + //------------------------------------------------------------- http.HandleFunc("/catcafe/login", UserLogin) //游客登录 http.HandleFunc("/catcafe/user/regeister", Regeister) //账号注册 http.HandleFunc("/catcafe/user/accountlogin", AccounLogin) //账号登录 @@ -62,6 +66,17 @@ func startServerHttpServe() { CheckErr(err) } +func ClearData(w http.ResponseWriter, r *http.Request) { + + result, _ := ioutil.ReadAll(r.Body) + r.Body.Close() + + s := string(result) + logger.Info("ClearData , body:%v", s) + + //HandleRegeister(w,s) +} + func Regeister(w http.ResponseWriter, r *http.Request) { result, _ := ioutil.ReadAll(r.Body) -- libgit2 0.21.0