Overloads download method to specify progress #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overloads download method to specify progress.
Notifying progress is something that might sound informative task, but in production environments might be a key operation, for example in case of a Java FX you might want to print a progress bar in the screen, or in a Kubernetes environment you might want to add a health check (Readiness check) till the download is completed.
Of course, there are multiple ways of doing it, but the library already provides the interface, so the best way is doing using it.
Instead of using the whole download method with all parameters, I have just added a new method that takes the model, where to store it and also let you redefine the progress bar. In this way, it is easier for developer to cover this use case and not having to pass all the arguments.
This is a helping method as developers can still use the full parameters method to do it.