In the NSURLConnectionDataDelegate there are a couple of functions that are pretty essential to making sure everything worked but I'm never sure what happens when.
The functions...
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response;
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data;
- (void)connectionDidFinishLoading:(NSURLConnection *)connection;
and a couple of others.
Do they always happen in the order I've put them? i.e. is the response the first thing you get or can it happen any time in the life of the connection?