NewObjectOK creates a new Reader with a 200 OK status.
(headers http.Header, body io.ReadCloser)
| 34 | |
| 35 | // NewObjectOK creates a new Reader with a 200 OK status. |
| 36 | func NewObjectOK(headers http.Header, body io.ReadCloser) *ObjectReader { |
| 37 | return &ObjectReader{ |
| 38 | Status: http.StatusOK, |
| 39 | Headers: headers, |
| 40 | Body: body, |
| 41 | contentLength: -1, // is set in Response() |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | // NewObjectPartialContent creates a new Reader with a 206 Partial Content status. |
| 46 | func NewObjectPartialContent(headers http.Header, body io.ReadCloser) *ObjectReader { |
no outgoing calls