Go
# Go
Print all HTTP Response Headers #
Including Status code 1
1 2 3 4 5 6 7 | |
Print Full HTTP Request and Response #
Includes Headers and Body in a well formatted way 2
* Request
* "Use httputil.DumpRequest() if you want to pretty-print the request on the server side."
* "Use httputil.DumpRequestOut() if you want to dump the request on the client side."
1 2 3 4 5 6 | |
- Response
1 2 3 4 5 6
respDump, err := httputil.DumpResponse(resp, true) if err != nil { log.Fatal(err) } fmt.Printf("RESPONSE:\n%s", string(respDump))
Last update: November 15, 2022