I would like to know if there is a way to get the HTTP response for a NSURLConnection
without making use of the delegate provided by Apple.
For example if I setup a connection in the following manner:
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url];
[request setHTTPMethod:@"POST"];
[request addValue:@"player.UpdateProfile" forHTTPHeaderField:@"player-profile"];
[self addHttpHeaders:request];
NSURLConnection *connection = [[NSURLConnection alloc]initWithRequest:request delegate:self startImmediately: YES];
Now here instead of delegating to self
and parsing the response in the didReceiveResponse
method, can I create a custom delegate where I can parse the response? I don't need a complete tutorial on how to do it but a nudge in the right direction would be appreciated. Thanks