gowalla/AFNetworking — pull request #87 by HowlingEverett (2011-10-21 08:27:52+00:00)
Title: Another concrete AFHTTPOperation subclass for your pleasure ...

Hi,

I've been following closely the activity on concrete AFHTTPOperation subclasses, and have put together a subclass for downloading arbitrary binary files and persisting them under the (and in an optional subpath of) users' document directories. It's modelled quite closely on the current version of AFImageRequestOperation.

The operation supports a few types of binary data as defaultAcceptableFileTypes - PDF, mp3, m4v, etc - but they can also call the addAcceptableFileType with a set of acceptable file types before enque-ing the operation.

Anyway, I built the subclass since I'm loving AFNetworking but needed to download files and persist to filesystem (similar to iOS5's NSURLDownloadConnection behaviour). If it's not really suitable for the core library I'll just maintain my fork for personal use :)