(req *http.Request)
| 229 | } |
| 230 | |
| 231 | func reqBody(req *http.Request) string { |
| 232 | if req == nil || req.Body == nil { |
| 233 | return "" |
| 234 | } |
| 235 | |
| 236 | defer req.Body.Close() |
| 237 | b, err := ioutil.ReadAll(req.Body) |
| 238 | if err != nil { |
| 239 | return "" |
| 240 | } |
| 241 | return string(bytes.TrimSpace(b)) |
| 242 | } |
no outgoing calls
no test coverage detected