INNER CODE UNIT · Go
printRawRequest
ghostsecurity/reaper · internal/cli/format.go:63
func printRawRequest(e entryFull) {
path := e.Path
if e.Query != "" {
path += "?" + e.Query
}
if path == "" {
path = "/"
}
fmt.Printf("%s %s HTTP/1.1\r\n", e.Method, path)
fmt.Printf("Host: %s\r\n", e.Host)
printHeaders(e.RequestHeaders)
fmt.Print("\r\n")
if len(e.RequestBody) > 0 {
fmt.Printf("%s", e.RequestBody)
}
}