我正在使用ASIHTTPRequest。我需要为什么requestWentWrong
被执行?有时应用程序工作正常,但有时它会执行requestWentWrong
方法。
1。)我需要知道为什么这是hapenning?
2。)执行requestWentWrong
时我该怎么办?我应该发送另一个操作到队列或?
[[self queue] cancelAllOperations];
[self setNetworkQueue:[ASINetworkQueue queue]];
[[self queue] setDelegate:self];
[[self queue] setRequestDidFinishSelector:@selector(requestCompletedL:)];
[[self queue] setRequestDidFailSelector:@selector(requestWentWrongL:)];
setQueueDidFinishSelector:@selector(queueCompletedL:)];
ASIHTTPRequest *req = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com"]];
[[self queue] addOperation:req];
[[self queue] go];
答案 0 :(得分:0)