diff --git a/main.go b/main.go index 15e6645..d91a91f 100644 --- a/main.go +++ b/main.go @@ -1,8 +1,10 @@ package main import ( + "fmt" "log" "net/http" + "net/http/httputil" ) //PathsConfig all system available pathes @@ -37,6 +39,7 @@ func main() { http.HandleFunc("/api", apiV1Main) http.HandleFunc("/upload", uploadHandler) http.HandleFunc("/crmfiles/", crmAttachmentHandler) + http.HandleFunc("/dumprequest", dumpReuestHandler) http.ListenAndServe(":65500", nil) } @@ -51,3 +54,8 @@ func setupRootFileServer() { //fs := http.FileServer(http.Dir("/mnt/data/workspace/angular.ts/wechat/ng2-admin/dist")) //http.Handle("/", fs) } + +func dumpReuestHandler(w http.ResponseWriter, r *http.Request) { + logRequestDebug(httputil.DumpRequest(r, true)) + fmt.Fprintf(w, "") +}