Updating download function to use reader rather than casting everything into bytes
diff --git a/openstack/objectstorage/v1/objects/requests.go b/openstack/objectstorage/v1/objects/requests.go
index 0ad0315..56004b2 100644
--- a/openstack/objectstorage/v1/objects/requests.go
+++ b/openstack/objectstorage/v1/objects/requests.go
@@ -3,7 +3,6 @@
import (
"fmt"
"io"
- "io/ioutil"
"time"
"github.com/racker/perigee"
@@ -128,11 +127,11 @@
MoreHeaders: h,
OkCodes: []int{200},
})
- defer resp.HttpResponse.Body.Close()
- body, err := ioutil.ReadAll(resp.HttpResponse.Body)
- res.Body = body
+
+ res.Body = resp.HttpResponse.Body
res.Err = err
res.Header = resp.HttpResponse.Header
+
return res
}