Inform the delegate on synchronous requests

This commit is contained in:
Blake Watters
2011-03-08 11:36:31 -05:00
parent 83f77e60ae
commit 5b1c5dae7e

View File

@@ -180,6 +180,12 @@
_isLoading = YES;
payload = [NSURLConnection sendSynchronousRequest:_URLRequest returningResponse:&URLResponse error:&error];
response = [[[RKResponse alloc] initWithSynchronousRequest:self URLResponse:URLResponse body:payload error:error] autorelease];
if (error) {
[self didFailLoadWithError:error];
} else {
[self didFinishLoad:response];
}
} else {
NSString* errorMessage = [NSString stringWithFormat:@"The client is unable to contact the resource at %@", [[self URL] absoluteString]];
NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys: