MCPcopy Create free account
hub / github.com/kataras/iris / responseWriter

Struct responseWriter

context/response_writer.go:144–155  ·  view source on GitHub ↗

ResponseWriter is the basic response writer, it writes directly to the underline http.ResponseWriter

Source from the content-addressed store, hash-verified

142// ResponseWriter is the basic response writer,
143// it writes directly to the underline http.ResponseWriter
144type responseWriter struct {
145 http.ResponseWriter
146
147 statusCode int // the saved status code which will be used from the cache service
148 // statusCodeSent bool // reply header has been (logically) written | no needed any more as we have a variable to catch total len of written bytes
149 written int // the total size of bytes were written
150 // yes only one callback, we need simplicity here because on FireStatusCode the beforeFlush events should NOT be cleared
151 // but the response is cleared.
152 // Sometimes is useful to keep the event,
153 // so we keep one func only and let the user decide when he/she wants to override it with an empty func before the FireStatusCode (context's behavior)
154 beforeFlush func()
155}
156
157var _ ResponseWriter = (*responseWriter)(nil)
158

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected