Request implements Printer.Request.
(req *http.Request)
| 76 | |
| 77 | // Request implements Printer.Request. |
| 78 | func (p CurlPrinter) Request(req *http.Request) { |
| 79 | if req != nil { |
| 80 | cmd, err := http2curl.GetCurlCommand(req) |
| 81 | if err != nil { |
| 82 | panic(err) |
| 83 | } |
| 84 | p.logger.Logf("%s", cmd.String()) |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | // Response implements Printer.Response. |
| 89 | func (CurlPrinter) Response(*http.Response, time.Duration) { |