Enhance the connection callback protocol to include other connection listener callbacks exposed by common. Start handling some HTTP request errors.

This commit is contained in:
Cameron Gutman
2014-10-21 14:54:10 -04:00
parent 01a2853032
commit ea24b39fbe
7 changed files with 83 additions and 27 deletions

View File

@@ -38,7 +38,8 @@ static const NSString* PORT = @"47984";
// Check root status_code
if (![HttpManager verifyStatus: rootNode]) {
//TODO: handle error
NSLog(@"ERROR: Request returned with failure status");
return NULL;
}
// Skip the root node
@@ -229,6 +230,7 @@ static const NSString* PORT = @"47984";
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
NSLog(@"connection error: %@", error);
dispatch_semaphore_signal(_requestLock);
}
@end