|
|
@ -34,17 +34,10 @@ func httpDump(req *http.Request, resp *http.Response) { |
|
|
|
} |
|
|
|
} |
|
|
|
if req.Method == "POST" { |
|
|
|
if req.Method == "POST" { |
|
|
|
fmt.Println(Green("URLEncoded form")) |
|
|
|
fmt.Println(Green("URLEncoded form")) |
|
|
|
err := req.ParseForm() |
|
|
|
|
|
|
|
fmt.Printf("%#v\n", req.Form) |
|
|
|
|
|
|
|
fmt.Printf("%#v\n", req.PostForm) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
logger.Println("parseForm error:", err) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
for k, v := range req.Form { |
|
|
|
for k, v := range req.Form { |
|
|
|
fmt.Printf("%s: %s\n", Blue(k), v) |
|
|
|
fmt.Printf("%s: %s\n", Blue(k), v) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
fmt.Println(Green("Response:")) |
|
|
|
fmt.Println(Green("Response:")) |
|
|
|