WriteHeader stores the status code as well as write the status code to original response writer.
(code int)
| 90 | |
| 91 | // WriteHeader stores the status code as well as write the status code to original response writer. |
| 92 | func (rw *responseWriter) WriteHeader(code int) { |
| 93 | rw.statusCode = code |
| 94 | rw.ResponseWriter.WriteHeader(code) |
| 95 | } |
| 96 | |
| 97 | // WithMetricsFunc will send stats like latency, rps and returning status code after the http handler finishes. |
| 98 | // It has to be applied to the actual handler function who serves the http request. |
no outgoing calls
no test coverage detected