ResetResponseWriter sets a new ResponseWriter implementation to this Context to use as its writer. Note, to change the underline http.ResponseWriter use ctx.ResponseWriter().SetWriter(http.ResponseWriter) instead.
(newResponseWriter ResponseWriter)
| 475 | // Note, to change the underline http.ResponseWriter use |
| 476 | // ctx.ResponseWriter().SetWriter(http.ResponseWriter) instead. |
| 477 | func (ctx *Context) ResetResponseWriter(newResponseWriter ResponseWriter) { |
| 478 | if rec, ok := ctx.IsRecording(); ok { |
| 479 | releaseResponseRecorder(rec) |
| 480 | } |
| 481 | |
| 482 | ctx.writer = newResponseWriter |
| 483 | } |
| 484 | |
| 485 | // Request returns the original *http.Request, as expected. |
| 486 | func (ctx *Context) Request() *http.Request { |