Subclass AFHTTPRequestOperationManager?

Viewed 2160

I find myself repeating a lot of code using AFHTTPRequestOperationManager throughout my code, so I was thinking about subclassing it, so I can set it up once as a singleton, and put all the code in the subclass, as opposed to have it spread out through my project. However on the NSHipster episode on AFNetworking 2.0 (http://nshipster.com/afnetworking-2/), it says:

The main difference in 2.0 is that you'll actually use this class directly, rather than subclass it, for reasons explained in the "Serialization" section.

Since AFNetworking and NSHipster have the same author, I regard this a valid argument.

So my question is, do people subclass AFHTTPRequestOperationManager in order to have most network code in one class, or am I overlooking something in the use of the framework?

2 Answers
Related