且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在AFNetworking使用enqueueBatchOfHTTPRequestOperations失败时重新添加操作

更新时间:2023-12-05 21:32:46

检查以下代码@ justLearningAgain

Check Below Code @justLearningAgain

[[WfServices sharedClient] GET:kGetAddress parameters:dicParam  success:^(AFHTTPRequestOperation *operation, id responseObject) {
        NSLog(@"RESPONSE ::: %@",responseObject);
  }failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    }];


+ (WfServices *)sharedClient
{
    static WfServices * _sharedClient = nil;
    static dispatch_once_t onceToken;

    dispatch_once(&onceToken, ^{
        _sharedClient = [[WfServices alloc] initWithBaseURL:[NSURL URLWithString:kWFBaseURLString]];
    });

    return _sharedClient;
}