0
随着AFNetworking 3如何添加依赖? 这些请求必须按照顺序工作... 我有这样的事情在for循环中,但当然,如果一个GET请求之前完成其他的整个序列是错误的。AFNetworking 3添加依赖?
AFHTTPSessionManager *manager = [self sessionManager];
[manager.operationQueue setMaxConcurrentOperationCount:1];
NSString *url = [_hostName.absoluteString stringByAppendingPathComponent:keyboardPath];
[manager GET:url parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
//do something
} // ... failure block
在AFNetworking 2我用来做这样的事情:
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc]initWithRequest:request];
[operation addDependency...
但现在AFHTTPRequestOperation
不存在了......
没用过这个包装......你能不能给我说说NSURLSessionTask一些代码做我想做什么? – Fabiosoft
https://github.com/inspace-io/INSOperationsKit/blob/master/Shared%20INSOperationKit%20Demo%20Code/Operations/INSDownloadOperation.m – mientus
我不能让它的工作......你有一个实际的例子? – Fabiosoft