Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants