Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Add data chunk to HTTPProgress when Type == .Download #53

Merged
merged 4 commits into from
Oct 29, 2016

Conversation

cryptoDevTrader
Copy link
Contributor

As far as I could tell, there was no way to access the data chunk being downloaded. This adds this data to HTTPProgress so it is accessible via the asyncProgressHandler.

Copy link
Owner

@dduan dduan left a comment

Choose a reason for hiding this comment

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

Looks good! I have one comment.

Thank you very much @divThis!

public var percent: Float {
return Float(bytesProcessed) / Float(bytesExpectedToProcess)
}

init(
Copy link
Owner

Choose a reason for hiding this comment

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

Can we pass in nil in upload, instead of adding this initializer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Done.

@dduan dduan merged commit d26b36c into dduan:master Oct 29, 2016
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants