取消单个操作:
AFHTTPRequestOperation *operation
= [[AFHTTPRequestOperation alloc] initWithRequest:request];
[operation cancel];
或者
AFHTTPRequestOperation *operation
= [postManager POST:request.methodUrl
parameters:parameters
success:^(AFHTTPRequestOperation *operation,
id responseObject) {
}failure:^(AFHTTPRequestOperation *operation,
NSError *error){
}];
[operation cancel];
取消所有操作:
AFHTTPRequestOperationManager *httpmanager
= [AFHTTPRequestOperationManager manager];
[httpManager.operationQueue cancelAllOperations];