response: Don't use bufReadCloser
This commit is contained in:
@@ -81,7 +81,11 @@ func ReadResponse(r io.ReadCloser) (*Response, error) {
|
||||
resp.Meta = string(meta)
|
||||
|
||||
if resp.Status.Class() == StatusSuccess {
|
||||
resp.Body = newBufReadCloser(br, r)
|
||||
type readCloser struct {
|
||||
io.Reader
|
||||
io.Closer
|
||||
}
|
||||
resp.Body = readCloser{br, r}
|
||||
} else {
|
||||
resp.Body = nopReadCloser{}
|
||||
r.Close()
|
||||
|
||||
Reference in New Issue
Block a user