| @@ -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, "") | |||
| } | |||