main
zhengbaoyang 8 years ago
parent baf79e0b3f
commit 44b8b2480c
  1. 1
      dump.go

@ -31,6 +31,7 @@ func httpDump(reqDump []byte, resp *http.Response) {
fmt.Println(Green("Request:"), respStatusStr) fmt.Println(Green("Request:"), respStatusStr)
req, _ := ParseReq(reqDump) req, _ := ParseReq(reqDump)
fmt.Printf("%s %s %s\n", Blue(req.Method), req.Host+req.RequestURI, respStatusStr) fmt.Printf("%s %s %s\n", Blue(req.Method), req.Host+req.RequestURI, respStatusStr)
fmt.Printf("%s %s\n", Blue("RemoteAddr:"), req.RemoteAddr)
for headerName, headerContext := range req.Header { for headerName, headerContext := range req.Header {
fmt.Printf("%s: %s\n", Blue(headerName), headerContext) fmt.Printf("%s: %s\n", Blue(headerName), headerContext)
} }

Loading…
Cancel
Save