Implement Flusher interface for responseRecorder
Signed-off-by: Dorin Geman <dorin.geman@docker.com>
This commit is contained in:
parent
fcf45f4271
commit
ac055739df
|
|
@ -29,6 +29,12 @@ func (rr *responseRecorder) WriteHeader(statusCode int) {
|
|||
rr.ResponseWriter.WriteHeader(statusCode)
|
||||
}
|
||||
|
||||
func (rr *responseRecorder) Flush() {
|
||||
if flusher, ok := rr.ResponseWriter.(http.Flusher); ok {
|
||||
flusher.Flush()
|
||||
}
|
||||
}
|
||||
|
||||
type RequestResponsePair struct {
|
||||
ID string `json:"id"`
|
||||
Model string `json:"model"`
|
||||
|
|
|
|||
Loading…
Reference in New Issue