Stream streams the specified reader into the response.
(status int, contentType string, reader io.Reader)
| 217 | |
| 218 | // Stream streams the specified reader into the response. |
| 219 | func (e *Event) Stream(status int, contentType string, reader io.Reader) error { |
| 220 | e.Response.Header().Set(headerContentType, contentType) |
| 221 | e.Response.WriteHeader(status) |
| 222 | _, err := io.Copy(e.Response, reader) |
| 223 | return err |
| 224 | } |
| 225 | |
| 226 | // Blob writes a blob (bytes slice) response. |
| 227 | func (e *Event) Blob(status int, contentType string, b []byte) error { |