使用 Restkit,我想重试失败的请求。我正在尝试从委托方法执行此操作,如下所示:
-(void)request:(RKRequest *)request didFailLoadWithError:(NSError *)error{
NSLog(error.domain);
NSLog([NSString stringWithFormat:@"%d",error.code]);
NSLog(error.localizedDescription);
NSLog(error.localizedFailureReason);
[request cancel];
[request reset];
[request send];
}
但是,我收到以下错误:
2013-01-14 11:19:29.423 Mobile_ACPL[7893:907] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempting to add the same request multiple times'
我怎样才能做到这一点?