WriteHeader writes the HTTP response header. It ensures that all headers are flushed before writing the status code.
(statusCode int)
| 134 | // |
| 135 | // It ensures that all headers are flushed before writing the status code. |
| 136 | func (w *Writer) WriteHeader(statusCode int) { |
| 137 | w.beforeWrite(statusCode) |
| 138 | |
| 139 | w.httpResponseWriter.WriteHeader(statusCode) |
| 140 | } |
| 141 | |
| 142 | // Write writes the HTTP response body. |
| 143 | // |