INNER CODE UNIT · Go
printRawResponse
ghostsecurity/reaper · internal/cli/format.go:81
func printRawResponse(e entryFull) {
statusText := http.StatusText(e.StatusCode)
if statusText == "" {
statusText = "Unknown"
}
fmt.Printf("HTTP/1.1 %d %s\r\n", e.StatusCode, statusText)
printHeaders(e.ResponseHeaders)
fmt.Print("\r\n")
if len(e.ResponseBody) > 0 {
fmt.Printf("%s", e.ResponseBody)
}
}
func pad(s string, width int) string {
return fmt.Sprintf("%*s", width, s)
}
func formatSize(n int) string {