Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Dump http request in Go
// 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