Created
June 6, 2019 21:35
-
-
Save maxclaus/fe48a821c7d56c2dc6278ce4a5ae338f to your computer and use it in GitHub Desktop.
Dump http request in Go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Save a copy of this request for debugging. | |
requestDump, err := httputil.DumpRequest(r, true) | |
if err != nil { | |
fmt.Println("--->DEBUG ERROR", r.URL, err) | |
} | |
fmt.Println("--->DEBUG BODY", r.URL, string(requestDump)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment