I am trying to understand how the AFNetworking Framework works. But I donโt understand the little things.
I wrote a subclass of AFHTTPclient , which made it a single class and added an initializer that does the following:
- (id)initWithBaseURL:(NSURL *)url { self = [super initWithBaseURL:url]; if (self) { [self registerHTTPOperationClass:[AFJSONRequestOperation class]]; } return self; }
I got this code from a tutorial that I found on the Internet, but I donโt understand why I need to register my class for JSONRequestOperation if I want to return JSON Data? What exactly happens under the hood if I do this? What does the registerHTTPOperation class do?
PS: Is there any good documentation with examples and detailed explanations of AFNetworking somewhere on the Internet?
source share