Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Updating download function to use reader#272

Merged
smashwilson merged 1 commit intorackspace:masterfrom
jamiehannaford:streaming-downloads
Oct 27, 2014
Merged

Updating download function to use reader#272
smashwilson merged 1 commit intorackspace:masterfrom
jamiehannaford:streaming-downloads

Conversation

@jamiehannaford
Copy link
Copy Markdown
Contributor

As #271 highlights, we're casting everything into a slice of bytes at the moment - so we should probably switch to a reader. This PR is just my initial thoughts, so feel free to suggest a better approach if anything pops into your head 😄

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nice. I was thinking we should keep a method around to do this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this needs to call dr.Body.Close()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pquerna yes, I think you're right - you can't really do anything with res.Body after it's been read to EOF

@smashwilson
Copy link
Copy Markdown
Contributor

:shipit:

smashwilson added a commit that referenced this pull request Oct 27, 2014
Updating download function to use reader
@smashwilson smashwilson merged commit f5bbdd7 into rackspace:master Oct 27, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants