PMHTTP icon indicating copy to clipboard operation
PMHTTP copied to clipboard

Support download tasks

Open lilyball opened this issue 8 years ago • 1 comments

We should support creation of download tasks. This would probably be another request type that's a sibling of HTTPManagerParseRequest<T>, implemented similarly to HTTPManagerParseRequest except it has a download callback that's invoked when the download is done, instead of a parse callback invoked when the task is complete.

If possible, we should also support canceling with resume state, and re-downloading with that resume state. This probably requires having a subclass of HTTPManagerTask for downloads.

lilyball avatar Jul 25 '16 21:07 lilyball

For anyone looking to do downloads today, you can use the .preparedURLRequest property of HTTPManagerRequest to get an NSURLRequest that you can use with NSURLSession.

lilyball avatar Aug 05 '16 21:08 lilyball