mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-24 04:46:01 +08:00
Reworked notifications for consistency with Cocoa idioms. Simplified code paths through the queue. Tweaked the logging for easier info at the Debug level without having to drop down to Trace.
This commit is contained in:
@@ -69,11 +69,13 @@
|
||||
|
||||
if (successful) {
|
||||
_isLoaded = YES;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:RKRequestReceivedResponseNotification
|
||||
object:self
|
||||
userInfo:nil];
|
||||
NSDictionary* userInfo = [NSDictionary dictionaryWithObject:_response
|
||||
forKey:RKRequestDidLoadResponseNotificationUserInfoResponseKey];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:RKRequestDidLoadResponseNotification
|
||||
object:self
|
||||
userInfo:userInfo];
|
||||
} else {
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:RKRequestFailedWithErrorNotification
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:RKRequestDidFailWithErrorNotification
|
||||
object:self
|
||||
userInfo:nil];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user