Response converts Reader to http.Response
(req *http.Request)
| 111 | |
| 112 | // Response converts Reader to http.Response |
| 113 | func (r *ObjectReader) Response(req *http.Request) *http.Response { |
| 114 | return &http.Response{ |
| 115 | Status: http.StatusText(r.Status), |
| 116 | StatusCode: r.Status, |
| 117 | Proto: "HTTP/1.0", |
| 118 | ProtoMajor: 1, |
| 119 | ProtoMinor: 0, |
| 120 | Header: r.Headers, |
| 121 | Body: r.Body, |
| 122 | Close: true, |
| 123 | Request: req, |
| 124 | ContentLength: r.ContentLength(), |
| 125 | } |
| 126 | } |
no test coverage detected