mirror of
https://github.com/kataras/iris.git
synced 2026-01-25 04:45:57 +00:00
context transactions removed and make Context.Domain customizable as requested
This commit is contained in:
@@ -29,17 +29,14 @@ func releaseResponseRecorder(w *ResponseRecorder) {
|
||||
rrpool.Put(w)
|
||||
}
|
||||
|
||||
// A ResponseRecorder is used mostly by context's transactions
|
||||
// in order to record and change if needed the body, status code and headers.
|
||||
// A ResponseRecorder is used mostly for testing
|
||||
// in order to record and modify, if necessary, the body and status code and headers.
|
||||
//
|
||||
// Developers are not limited to manually ask to record a response.
|
||||
// To turn on the recorder from a Handler,
|
||||
// rec := context.Recorder()
|
||||
// See `context.Recorder`` method too.
|
||||
type ResponseRecorder struct {
|
||||
ResponseWriter
|
||||
|
||||
// keep track of the body in order to be
|
||||
// resetable and useful inside custom transactions
|
||||
// keep track of the body written.
|
||||
chunks []byte
|
||||
// the saved headers
|
||||
headers http.Header
|
||||
|
||||
Reference in New Issue
Block a user