PMHTTP
PMHTTP copied to clipboard
Support download tasks
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.
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
.